-
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
Require full codomain of map when assigning to mapped field #2840
Require full codomain of map when assigning to mapped field #2840
Conversation
…to sainati/entitlement-mapping-assign
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:feature/stable-cadence commit d45a8ec Collapsed results for better readability
|
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/stable-cadence #2840 +/- ##
=======================================================
Coverage 79.87% 79.87%
=======================================================
Files 343 343
Lines 81119 81122 +3
=======================================================
+ Hits 64795 64798 +3
Misses 14018 14018
Partials 2306 2306
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
Nice! 👏
I was just gonna report something similar. Let me check if this fixes that. PS: I am not sure this was caught at runtime part. |
Closes #2839
It was possible to circumvent the checker when assigning to a mapped entitlement field, by assigning a field to a reference and then accessing it on an owned value, tricking the checker into "escalating" the entitlements on the inner value. This was caught at runtime, but should be caught by the checker instead. The checker should require a fully-entitled input when assigning to a mapped field.
Thanks @oebeling for the report
master
branchFiles changed
in the Github PR explorer