-
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
duplicate entries in map (and possibly slice/array) decls don't throw an error #758
Comments
I was wondering why you were also mentioning slices for this bug: I didn't know it was possible to create a slice like that! 😮 |
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Apr 20, 2023
related to gnolang#758 If you manage to solve this challenge by updating the gnovm code, move those files into the `gnovm/test/files` folder (eventually increment the number suffix in the name according to existing files).
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Apr 20, 2023
- Add 2 challenges for map and slice literals, as described in gnolang#758 - Add a challenge to handle chained panics, as described in gnolang#756 - Add a challenge to handle a specific rule of recover, as described in this [comment][0] If you manage to solve one of these challenges by updating the gnovm code, move those files into the `gnovm/test/files` folder (eventually increment the number suffix in the name according to existing files). [0]: gnolang#756 (comment)
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Apr 20, 2023
- Add 2 challenges for map and slice literals, as described in gnolang#758 - Add a challenge to handle chained panics, as described in gnolang#756 - Add a challenge to handle a specific rule of recover, as described in this [comment][0] If you manage to solve one of these challenges by updating the gnovm code, move those files into the `gnovm/test/files` folder (eventually increment the number suffix in the name according to existing files). [0]: gnolang#756 (comment)
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Apr 20, 2023
- Add 2 challenges for map and slice literals, as described in gnolang#758 - Add a challenge to handle chained panics, as described in gnolang#756 - Add a challenge to handle a specific rule of recover, as described in this [comment][0] Also add some working recover cases in `tests/files`, to increase code coverage. If you manage to solve one of these challenges by updating the gnovm code, move those files into the `gnovm/test/files` folder (eventually increment the number suffix in the name according to existing files). [0]: gnolang#756 (comment)
@tbruyelle the most common use I've found in the wild is to create "cheap" maps of ie. forbidden characters and similar. var forbidden = [256]bool{
'$': true,
'%': true,
'-': true,
} the remaining will be initialized to false as a zero value :) |
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Apr 27, 2023
Fix gnolang#758 Also enrich tests/files with more cases of map, slice and arrau literals.
thehowl
pushed a commit
that referenced
this issue
May 17, 2023
Fix #758 Also enrich tests/files with more cases of map, slice and array literals.
moul-bot
pushed a commit
that referenced
this issue
May 19, 2023
Fix #758 Also enrich tests/files with more cases of map, slice and array literals.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See #708
Does not error in parsing/execution. My suspect is that this doesn't happen in array/slice declaration either (ie.
[]string{0: "a", 10: "b", 10: "c"}
The text was updated successfully, but these errors were encountered: