-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix common supertype calculation for optionals #1594
Conversation
StringType, | ||
}, | ||
expectedSuperType: AnyStructType, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved these two tests to a dedicated test for optionals
c77719d
to
85dedf2
Compare
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit f07c18f Results
|
Codecov Report
@@ Coverage Diff @@
## master #1594 +/- ##
==========================================
+ Coverage 74.72% 74.73% +0.01%
==========================================
Files 288 288
Lines 55305 55340 +35
==========================================
+ Hits 41324 41359 +35
Misses 12487 12487
Partials 1494 1494
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great fix!
Closes #1592
Description
The optionals were not properly unwrapped before going into the struct-common-supertype finding path.
Solution:
With this, supertype of
T
,T?
,T??
will beT??
master
branchFiles changed
in the Github PR explorer