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

Replace uses of AliasType#types? by Type#lookup_name #15068

Merged

Conversation

straight-shoota
Copy link
Member

Introduces Type#lookup_name as a dedicated mechanism for looking up a name in a namespace. This allows us to drop the override of AliasType#types? which delegated to the aliased type. Thus cyclic hierarchies are no longer possible and we can drop all code that was necessary only for handling that.

Resolves #15066

Copy link
Contributor

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds too simple to be true. Nice!

@straight-shoota straight-shoota added this to the 1.15.0 milestone Oct 10, 2024
@straight-shoota straight-shoota self-assigned this Oct 10, 2024
@straight-shoota straight-shoota merged commit 4daf486 into crystal-lang:master Oct 14, 2024
66 checks passed
@straight-shoota straight-shoota deleted the refactor/alias_type-types branch October 14, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cyclic references in the type hierarchy
2 participants