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 crash on uninstantiated field access #13517

Merged
merged 1 commit into from Sep 14, 2021

Conversation

smarter
Copy link
Member

@smarter smarter commented Sep 13, 2021

The uninstantiated access in the test case happens because the closure
passed to the HKTypeLambda constructor to construct the result type by
HKTypeLambda.newLikeThis calls subst which eventually calls
HKTypeLambda#equals, I don't see a way to prevent that at the source,
so make equality checking robust to uninstantatied fields.

Fixes #13513.

The uninstantiated access in the test case happens because the closure
passed to the HKTypeLambda constructor to construct the result type by
`HKTypeLambda.newLikeThis` calls `subst` which eventually calls
`HKTypeLambda#equals`, I don't see a way to prevent that at the source,
so make equality checking robust to uninstantatied fields.

Fixes scala#13513.
Copy link
Contributor

@Kordyjan Kordyjan left a comment

Choose a reason for hiding this comment

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

Makes sense for me.

@Kordyjan Kordyjan merged commit 6a6dd7b into scala:master Sep 14, 2021
@Kordyjan Kordyjan deleted the fix-i13513 branch September 14, 2021 08:07
@Kordyjan Kordyjan added this to the 3.1.1 milestone Aug 2, 2023
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 this pull request may close these issues.

NullPointerException at dotty.tools.dotc.core.Types$HKTypeLambda.iso
2 participants