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

Add checking for declaration of reserved variable names (writer and self) #919

Merged
merged 2 commits into from
Dec 7, 2023

Conversation

PizzasBear
Copy link
Contributor

Check for declaration of variables named writer or self when parsing a target, and error if found.

Signed-off-by: max <gmx.sht@gmail.com>
@djc
Copy link
Owner

djc commented Nov 27, 2023

Did you actually run into this? What's your use case, anyway?

@PizzasBear
Copy link
Contributor Author

PizzasBear commented Nov 27, 2023

I didn't run into it, but I just thought it'd be useful for someone who does.
The name writer could, for example, refer to the writer of a blog, and properly erroring would be helpful then.

Signed-off-by: max <gmx.sht@gmail.com>
@djc
Copy link
Owner

djc commented Nov 28, 2023

Okay, I think think this complexity has diminishing returns so I'd rather avoid this.

@Kijewski
Copy link
Contributor

IMO that's a good addition. I don't think people will try to use self as an argument name, but I can see people stumble over the name writer.

@djc djc merged commit 7f30a65 into djc:main Dec 7, 2023
20 checks passed
@djc
Copy link
Owner

djc commented Dec 7, 2023

Alright, let's do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants