Skip to content
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

Constants are able to shadow variables #149

Open
phorward opened this issue Feb 9, 2025 · 0 comments
Open

Constants are able to shadow variables #149

phorward opened this issue Feb 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@phorward
Copy link
Member

phorward commented Feb 9, 2025

This looks invalid:

>>> a : 1
>>> a = 2
Line 1, column 1: Cannot assign to constant 'a'
>>> b = 1
>>> b : 2
>>> # all fine? b (constant) shadows b (variable)

Either expecting a similar error message, that variables cannot be assigned like constants, or some other behavior.

@phorward phorward added the bug Something isn't working label Feb 9, 2025
@phorward phorward changed the title Constants cannot be overwritten, but variables? Constants are able to shadow variables Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant