-
Notifications
You must be signed in to change notification settings - Fork 138
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 GetNativeCompositeValueComputedFields #2977
Conversation
do not keep using the "cached" initial value
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 3946910 Collapsed results for better readability
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2977 +/- ##
=======================================
Coverage 80.15% 80.15%
=======================================
Files 348 348
Lines 81925 81929 +4
=======================================
+ Hits 65663 65667 +4
Misses 13942 13942
Partials 2320 2320
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
Pass and use the current composite value, do not keep using the "cached" initial value.
This is necessary, because
CompositeValue.Transfer
also transfers (for a struct, copies)computedFields
(and alsoinjectedFields
), which previously effectively kept referring to the source value, not the transferred value.Discovered while updating the Emulator to the latest Cadence commit.
Sill wondering how to test the bug and prevent a regression.
master
branchFiles changed
in the Github PR explorer