Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow InclusiveRange<T> if T is a non-leaf integer #2959

Merged

Conversation

darkdrag00nv2
Copy link
Contributor

@darkdrag00nv2 darkdrag00nv2 commented Dec 1, 2023

Closes #2885

Description

Disallow InclusiveRange if T is a non-leaf integer. At the moment, the two non-leaf integer types are - Integer and SignedInteger.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (7ab492f) 79.63% compared to head (733cf47) 79.61%.

❗ Current head 733cf47 differs from pull request most recent head d5b746c. Consider uploading reports for the commit d5b746c to get more accurate results

Files Patch % Lines
runtime/stdlib/range.go 87.50% 2 Missing and 1 partial ⚠️
runtime/sema/type.go 88.88% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           feature/range-type    #2959      +/-   ##
======================================================
- Coverage               79.63%   79.61%   -0.02%     
======================================================
  Files                     336      336              
  Lines                   79754    79813      +59     
======================================================
+ Hits                    63511    63547      +36     
- Misses                  13875    13894      +19     
- Partials                 2368     2372       +4     
Flag Coverage Δ
unittests 79.61% <92.64%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👌

runtime/sema/errors.go Outdated Show resolved Hide resolved
runtime/sema/type.go Outdated Show resolved Hide resolved
@turbolent turbolent self-assigned this Dec 4, 2023
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

runtime/sema/check_invocation_expression.go Outdated Show resolved Hide resolved
Copy link
Member

@SupunS SupunS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@SupunS SupunS merged commit 5d74897 into onflow:feature/range-type Dec 5, 2023
5 of 9 checks passed
@darkdrag00nv2 darkdrag00nv2 deleted the range_type_covariant_subtyping branch December 6, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants