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
This does not compile as expected, aside from the error message, which suggests that a sanity check should be performed instead of a simple type assertion.
package main
funcmain() {
vara, b=1
}
// Error:// interface conversion: gnolang.Expr is *gnolang.ConstExpr, not *gnolang.CallExpr
This situation is similar in that it doesn't compile as expected, but the error message indicates that it should be checked beforehand, possibly within predefineFileSet, and then halted.
package main
funcmain() {
vara, b, c=1, a+1println(a)
println(b)
println(c)
}
// Error:// main/files/value_decl1.gno:3: constant definition loop with a:
The text was updated successfully, but these errors were encountered:
Closes#2137
<!-- please provide a detailed description of the changes made in this
pull request. -->
<details><summary>Contributors' checklist...</summary>
- [ ] 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](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
---------
Co-authored-by: Miloš Živković <milos@zmilos.com>
This does not compile as expected, aside from the error message, which suggests that a sanity check should be performed instead of a simple type assertion.
This situation is similar in that it doesn't compile as expected, but the error message indicates that it should be checked beforehand, possibly within
predefineFileSet
, and then halted.The text was updated successfully, but these errors were encountered: