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

Fix Class#=== on metaclass #11162

Merged
merged 2 commits into from
May 3, 2024
Merged

Conversation

makenowjust
Copy link
Contributor

Fix #10736

This fix seems like a workaround, but I think there is no clear solution for this issue.
At least, this fix works perfectly. It is a good point.

If an instance type of Class returns Class instead of Object, it fixes this issue also.
However, it causes uncountable stack overflows and endless loops because the compiler does not expect instance type is recursive.
In addition, I'm not sure this is a true or good solution.

@makenowjust makenowjust changed the title Fix Class#=== for metaclass Fix Class#=== on metaclass Sep 2, 2021
@caspiano caspiano added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic labels Oct 27, 2022
Copy link
Member

@beta-ziliani beta-ziliani left a comment

Choose a reason for hiding this comment

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

I share the concerns in the OP, but this is at least a solution

@straight-shoota straight-shoota added this to the 1.13.0 milestone May 2, 2024
@straight-shoota straight-shoota merged commit e1e6dcd into crystal-lang:master May 3, 2024
60 checks passed
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.

Class#=== is broken on metaclass receivers
4 participants