-
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
Add support iterating references to iterables #2876
Conversation
f13e9bd
to
9162f3e
Compare
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:feature/stable-cadence commit 0bfd2c0 Collapsed results for better readability
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feature/stable-cadence #2876 +/- ##
==========================================================
- Coverage 79.97% 79.97% -0.01%
==========================================================
Files 344 344
Lines 81248 81356 +108
==========================================================
+ Hits 64980 65064 +84
- Misses 13961 13984 +23
- Partials 2307 2308 +1
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 just realized this need to track resource references. |
f8c5886
to
3ec9749
Compare
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 👌
Closes #2784
Description
Allow using array references in for loops.
For an array of type
[T]
, the type of the loop-variablev
would be:T
, if the array element typeT
is a primitive.&T
, if the array element is a container type.This is to be consistent with the member access semantics: https://github.com/onflow/flips/blob/120b8aa473e5040db2b99034d2118fb78d053cdf/cadence/20230517-member-access-semnatics.md
master
branchFiles changed
in the Github PR explorer