You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
panic: constant definition loop with a [recovered]
panic: test/main.go:2: constant definition loop with a [recovered]
panic: test/main.go:2: constant definition loop with a
The fix for issue will possibly also implicate this bug.
A more complicated example that needs to work too
vara, b, c=1, a+d, 3vard=a
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:
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`.
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 <[email protected]>
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: