-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Handle type aliases in contextFunctionResultTypeAfter #21517
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
Conversation
case defn.FunctionTypeOfMethod(mt) => recur(mt.resType, n - 1) | ||
case _ => tp |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
Closes scala#21433 [Cherry-picked 590691b][modified]
Closes #21433