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

Redefine an ill-defined variable in the repl #1167

Open
xnning opened this issue Nov 22, 2022 · 1 comment
Open

Redefine an ill-defined variable in the repl #1167

xnning opened this issue Nov 22, 2022 · 1 comment

Comments

@xnning
Copy link
Collaborator

xnning commented Nov 22, 2022

7b09688

With the above commit, is there a way that I can redefine an ill-defined variable in the repl? say

>=> x = 1
>=> y = x' + 1 -- oops I got a typo. error: variable not in scope: x'. That's fine
>=> y = x + 1 -- would like to correct it, but now: variable already defined: y
@apaszke
Copy link
Collaborator

apaszke commented Nov 23, 2022

Ah good catch! I agree that a well-typed definition of a variable should shadow an incorrectly defined variable!

@axch axch changed the title Redefine an ill-defined variable in the repo Redefine an ill-defined variable in the repl Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants