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

Exclude Object.class from generic module instance metaclasses' ancestors #11114

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

HertzDevil
Copy link
Contributor

Fixes #11110.

If the result of substituting some generic type variables into T is also T itself, then we also make T.class return itself upon the same substitutions. This avoids the need to hardcode Class's identity.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:lang:type-system breaking-change labels Aug 21, 2021
@HertzDevil
Copy link
Contributor Author

The current workaround worsens #5695 by defining #to_json / #to_yaml on non-generic module-typed variables as well. I think I will return to this once that issue is resolved.

@HertzDevil HertzDevil marked this pull request as draft March 15, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:lang:type-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ancestors of module metaclasses are inconsistent
2 participants