-
Notifications
You must be signed in to change notification settings - Fork 341
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
docs: gno does not support shadowing native types #1711
Conversation
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.
Makes sense 👍
BTW to fully close #1091 I suggest we catch the error explicitly and return a useful error message (currently, the fact that we don't allow shadowing native types seems accidental). |
Sounds good. I modified the error message that gets returned when this happens. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1711 +/- ##
=======================================
Coverage 47.47% 47.47%
=======================================
Files 385 385
Lines 61376 61375 -1
=======================================
Hits 29139 29139
+ Misses 29802 29801 -1
Partials 2435 2435 ☔ View full report in Codecov by Sentry. |
Still good with this @leohhhn? |
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.
@deelawn should it be "built-in"? Otherwise just the capitalization on language names.
Sorry for the back and forth, should have checked earlier, but I guess the closest term to what is on the Go spec is predeclared. The spec still uses I guess that also raises the question of whether built-in functions are also considered predeclared, and hence not shadowable, or not. |
Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com>
Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com>
Should we bring this up during the PR discussion meeting or just change the name to |
closes #1091
This is a simple documentation update to clarify that gno does not support shadowing native types. I've discussed with @jaekwon and this is not something we want to support.