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

Add support for value assignment in declaration #173

Conversation

cburgdorf
Copy link
Collaborator

What was wrong?

Previously, this code would fail:

another_reference: u256[10] = my_array

As a workaround declaration and assignment could be split apart.

another_reference: u256[10]
another_reference =  = my_array

With this change, the shorter declaration with assignment syntax is supported.

How was it fixed?

  • Added implementation to map value assignments in declarations
  • Rewrote test code that used workaround

To-Do

  • OPTIONAL: Update Spec if applicable

  • Add entry to the release notes (may forgo for trivial changes)

  • Clean up commit history

@cburgdorf cburgdorf force-pushed the christoph/feat/value_assignment_in_declaration branch from 131931c to d8b0837 Compare December 20, 2020 00:03
@codecov-io
Copy link

codecov-io commented Dec 20, 2020

Codecov Report

Merging #173 (d8b0837) into master (3826aea) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #173      +/-   ##
==========================================
+ Coverage   79.98%   80.01%   +0.03%     
==========================================
  Files          44       44              
  Lines        3198     3198              
==========================================
+ Hits         2558     2559       +1     
+ Misses        640      639       -1     
Impacted Files Coverage Δ
compiler/src/yul/mappers/declarations.rs 100.00% <ø> (ø)
compiler/src/abi/elements.rs 74.64% <0.00%> (+1.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3826aea...d8b0837. Read the comment docs.

@cburgdorf cburgdorf merged commit 7dc28c6 into ethereum:master Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants