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

Restore structural equality of the Type hierarchy #258

Closed
Ladicek opened this issue Sep 9, 2022 · 1 comment · Fixed by #261
Closed

Restore structural equality of the Type hierarchy #258

Ladicek opened this issue Sep 9, 2022 · 1 comment · Fixed by #261
Assignees
Milestone

Comments

@Ladicek
Copy link
Collaborator

Ladicek commented Sep 9, 2022

The Type hierarchy actually documents that it provides structural equality. The addition of TypeVariableReference broke that guarantee (for types that contain references), because equality of type variable references is based on object identity. We need to find a way to restore structural equality even in this case.

@Ladicek
Copy link
Collaborator Author

Ladicek commented Sep 9, 2022

Specific use case: ArC (the CDI container in Quarkus) uses TypeVariables as keys to a Map when searching for bean types, during which it has to "resolve type parameters" (apply type arguments supplied by subclasses to generic superclasses, which are effectively type constructors in this context).

@Ladicek Ladicek self-assigned this Sep 9, 2022
@Ladicek Ladicek added this to the 3.0.1 milestone Sep 9, 2022
@Ladicek Ladicek changed the title Restore structural equality of types Restore structural equality of Types Sep 9, 2022
@Ladicek Ladicek changed the title Restore structural equality of Types Restore structural equality of the Type hierarchy Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant