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

fix(gnovm): handle non call expression valuedecl values #2647

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

deelawn
Copy link
Contributor

@deelawn deelawn commented Jul 31, 2024

Closes #2636.

With a value declaration like var a, b = ..., we currently only support a call expression on the RHS. This PR supports type assertion and index expressions as well.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Jul 31, 2024
@deelawn deelawn requested a review from ltzmaxwell July 31, 2024 03:49
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 60.16%. Comparing base (5f28803) to head (dd9f730).
Report is 19 commits behind head on master.

Files Patch % Lines
gnovm/pkg/gnolang/preprocess.go 91.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2647      +/-   ##
==========================================
+ Coverage   60.14%   60.16%   +0.02%     
==========================================
  Files         560      561       +1     
  Lines       74738    75507     +769     
==========================================
+ Hits        44950    45431     +481     
- Misses      26400    26663     +263     
- Partials     3388     3413      +25     
Flag Coverage Δ
contribs/gnodev 61.40% <ø> (+0.81%) ⬆️
contribs/gnofaucet 14.46% <ø> (ø)
gno.land 64.75% <ø> (+0.59%) ⬆️
gnovm 64.16% <91.66%> (-0.12%) ⬇️
misc/genstd 80.54% <ø> (ø)
misc/logos 19.88% <ø> (ø)
tm2 62.09% <ø> (+0.07%) ⬆️

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.

Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

ok; i still think the problem is that we should not have different code for AssignStmt.DECL and DeclStmt. but it's fine to fix the issue directly.

Copy link
Contributor

@piux2 piux2 left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you!

@deelawn deelawn merged commit 6214fe9 into gnolang:master Aug 19, 2024
117 checks passed
@deelawn deelawn deleted the fix/valuedecl-noncall branch August 19, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Panic on Type Assertion with Interface
4 participants