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

compiler: declare compoud types with var keyword #800

Merged
merged 2 commits into from
Mar 29, 2020
Merged

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Mar 26, 2020

Closes #695 .

@codecov
Copy link

codecov bot commented Mar 26, 2020

Codecov Report

Merging #800 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #800      +/-   ##
==========================================
+ Coverage    66.8%   66.86%   +0.06%     
==========================================
  Files         141      141              
  Lines       12980    13006      +26     
==========================================
+ Hits         8671     8697      +26     
  Misses       3899     3899              
  Partials      410      410
Impacted Files Coverage Δ
pkg/compiler/analysis.go 95.1% <100%> (+0.57%) ⬆️
pkg/compiler/codegen.go 87.94% <100%> (+0.16%) ⬆️

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 c738975...3cbd138. Read the comment docs.

Previously this declarations were ignored which resulted
in runtime errors, because VM's nil is an element of primitive type
and can't be converted to an array.
Previously, struct variables were initialize with VM's nil value
which is of primitive type. Thus SETITEM used for struct's field
updating wasn't working.
@roman-khimov roman-khimov merged commit 6f13455 into master Mar 29, 2020
@roman-khimov roman-khimov deleted the fix/slice branch March 29, 2020 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler Go smart contract compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compiler: slice of structs definition with var keyword compiles incorrectly
2 participants