Skip to content
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

Introduce toVariableSized to ConstantSizedArray type #3016

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

darkdrag00nv2
Copy link
Contributor

@darkdrag00nv2 darkdrag00nv2 commented Jan 11, 2024

Work towards #2530

Description

Introduce toVariableSized function to ConstantSizedArray type. This function will return a variable sized array whose contents are copies of the original constant sized array.

Since copy of values are involved, this is not available if the inner type of the constant sized array is a resource.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (03ecaca) 79.99% compared to head (7062bcc) 80.23%.
Report is 175 commits behind head on master.

Files Patch % Lines
runtime/interpreter/value.go 88.67% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3016      +/-   ##
==========================================
+ Coverage   79.99%   80.23%   +0.23%     
==========================================
  Files         356      359       +3     
  Lines       82935    84397    +1462     
==========================================
+ Hits        66342    67713    +1371     
- Misses      14236    14251      +15     
- Partials     2357     2433      +76     
Flag Coverage Δ
unittests 80.23% <93.10%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SupunS SupunS added the Feature label Jan 11, 2024
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/sema/type.go Outdated Show resolved Hide resolved
runtime/sema/type.go Show resolved Hide resolved
runtime/tests/checker/arrays_dictionaries_test.go Outdated Show resolved Hide resolved
darkdrag00nv2 and others added 3 commits January 12, 2024 22:28
Co-authored-by: Bastian Müller <bastian@turbolent.com>
Co-authored-by: Bastian Müller <bastian@turbolent.com>
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Member

@SupunS SupunS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@SupunS SupunS merged commit cfb4abf into onflow:master Jan 15, 2024
11 of 14 checks passed
@darkdrag00nv2 darkdrag00nv2 deleted the 2530-const-var-array branch January 16, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants