-
Notifications
You must be signed in to change notification settings - Fork 375
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
bug: var declaration definition loop #1849
Milestone
Comments
petar-dambovaliev
added
📦 🤖 gnovm
Issues or PRs gnovm related
🐞 bug
Something isn't working
labels
Mar 27, 2024
petar-dambovaliev
added a commit
that referenced
this issue
Apr 9, 2024
This PR fixes [this](#1849) and [this](#1463). Before preprocessing, a dependency graph is created and edges between the nodes which represent the relationship between global `var` and `const` declarations. Then, a new slice of declarations is created that is topologically sorted. This enables the rest of the preprocessing code to work the way it is now. Small scale refactoring is included by removing unnecessary else statements in `PredefineFileSet`.
After a conversation with @jaekwon , this should not be valid code in gno. |
zivkovicmilos
modified the milestones:
🏗4️⃣ test4.gno.land,
🏗4️⃣ test4.gno.land [POST LAUNCH]
Jul 9, 2024
thehowl
added a commit
that referenced
this issue
Sep 12, 2024
fixes [this](#1849) by splitting value declarations with multiple values into single declarations with a single value. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs --------- Co-authored-by: Morgan Bazalgette <morgan@morganbaz.com>
github-project-automation
bot
moved this from In Progress
to Done
in 🧙♂️gno.land core team
Sep 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code should print 1, 2 and 3. playground
Instead, it panics.
The fix for issue will possibly also implicate this bug.
A more complicated example that needs to work too
Here the initialization order needs to be
a
,d
,b
,c
.This means that the design of the implementation must be able to work in a more granular way.
This is a problem only for global var and const declarations.
The text was updated successfully, but these errors were encountered: