Skip to content

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

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:chore/crystal-var-eq-type
Jun 10, 2025
Merged

Do not consider type in Crystal::Var#==#15884
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:chore/crystal-var-eq-type

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