-
Notifications
You must be signed in to change notification settings - Fork 355
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
chore(gnolang): add challenges #765
Conversation
- 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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(TIL that when we use println
on nil values it prints "undefined"... smells very javascript-y to me 😞 )
|
||
// Error: | ||
// first | ||
// second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// second | |
// second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got ninja'd by manfred... shouldn't be too much of a problem though, if somebody does fix the challenges they'll probably have to adjust the output anyway.
yes :)
// Output: | ||
// g recover undefined | ||
// f recover wtf | ||
// false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// false |
Got ninja'd by manfred... shouldn't be too much of a problem though, if somebody does fix the challenges they'll probably have to adjust the output anyway. |
This also surprised me, initially I was expecting |
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).