-
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
Track inner values of resource-kinded optionals #1630
Conversation
…ce into optional-resource-reference-fix
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 7b77432 Results
|
Codecov Report
@@ Coverage Diff @@
## master #1630 +/- ##
==========================================
- Coverage 74.76% 74.76% -0.01%
==========================================
Files 288 288
Lines 55382 55386 +4
==========================================
+ Hits 41406 41408 +2
- Misses 12481 12483 +2
Partials 1495 1495
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 work!
For the other resource-kinded objects (composites, dictionaries, and arrays) we could track via their dedicated storage ID (as they are mutable, they are stored in separate slabs).
However, optionals (SomeValue
) are potentially inlined in storage, so do not have a dedicated storage ID.
I thought at first this is an issue, but as you showed, tracking the potentially resource-kinded inner value of the optional works fine, nice 👍
Closes #1539
Description
With the change in #1303, it is no longer possible to obtain a reference to an optional value, as all such references are automatically transformed into optional references. However, these references were not properly tracked by the logic added in #1344, meaning that the linked issue was still possible despite the cause seemingly being removed. This adds proper tracking for the inner values of resource-kinded optionals.
master
branchFiles changed
in the Github PR explorer