Skip to content

Do not consider type in Crystal::Var#== #15884

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

Merged

Conversation

HertzDevil
Copy link
Contributor

Crystal::Var already has def_equals name in src/compiler/crystal/syntax/ast.cr; the use of type? appears to be unnecessary.

This might affect macros in subtle ways, but the chances are very small: few (none?) Vars accessible inside macros are typed, and it is hard to find Vars with the same name but different types in the same context anyway.

@straight-shoota straight-shoota added this to the 1.17.0 milestone Jun 5, 2025
@straight-shoota straight-shoota merged commit 70431fb into crystal-lang:master Jun 10, 2025
38 checks passed
@HertzDevil HertzDevil deleted the chore/crystal-var-eq-type branch June 10, 2025 15:29
@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. and removed kind:chore labels Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants