-
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 field initialization: nested intersection should not override outer set #1524
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1524 +/- ##
=======================================
Coverage 74.68% 74.68%
=======================================
Files 289 289
Lines 55607 55602 -5
=======================================
Hits 41528 41528
+ Misses 12584 12580 -4
+ Partials 1495 1494 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 668062c Results
|
Closes #1523
Description
If-statement branches are checked using
Checker.checkConditionalBranches
.It temporarily creates a new child member set, checks each branch with the temporary member set (using
Checker.checkWithInitializedMembers
, then "merges" the result by building an intersection (a field is considered initialized if it was initialized in both branches).The existing implementation was overwriting the outer if-statements member set.
Instead, mutate the current member set in-place when computing the intersection.
master
branchFiles changed
in the Github PR explorer