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

Handle type aliases in contextFunctionResultTypeAfter #21517

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wjoel
Copy link
Contributor

@wjoel wjoel commented Aug 30, 2024

Closes #21433

case defn.FunctionTypeOfMethod(mt) => recur(mt.resType, n - 1)
case _ => tp
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tp.dealias on its own is enough to fix the issue.

Do we want to crash if we don't match defn.FunctionTypeOfMethod(mt)? If yes, we shouldn't add this line.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we do want it to crash here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, default case has been removed.

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

case defn.FunctionTypeOfMethod(mt) => recur(mt.resType, n - 1)
case _ => tp
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we do want it to crash here.

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.

Unhandled exception while running erasure
2 participants