Skip to content

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

Merged
merged 1 commit into from
Jan 31, 2025

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.

@Gedochao Gedochao requested a review from odersky September 2, 2024 11:46
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.

@KacperFKorban KacperFKorban merged commit 590691b into scala:main Jan 31, 2025
28 checks passed
@wjoel wjoel deleted the fix-21433 branch February 1, 2025 07:54
@WojciechMazur WojciechMazur added this to the 3.7.0 milestone Mar 11, 2025
tgodzik pushed a commit to scala/scala3-lts that referenced this pull request Apr 21, 2025
tgodzik added a commit to scala/scala3-lts that referenced this pull request Apr 21, 2025
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
4 participants