-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Prevent crash in SAM conversion with mismatched arity #23877
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
base: main
Are you sure you want to change the base?
Conversation
val tree = | ||
if (mt.isResultDependent) { | ||
if (formals.length != defaultArity) | ||
untpd.TypeTree() |
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.
From the doc of the enclosing function, it seems we should return a wildcard type when a type is not known, hence:
untpd.TypeTree() | |
typeTree(WildcardType) |
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.
880fc84
Thank you for your review. Could you tell me where I can find the doc?
tests/neg/i123577.scala
Outdated
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.
Could you add an i123577.check
file to ensure that the displayed error is meaningful?
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.
Looks good now. Would you mind squashing all the commits into one with a clean commit message? Right now that's a lot of messy commits for so few lines of code changes :p |
rename test file fix fix test address reviews
Done! |
I don’t see why it failed. testCompilation passed on my machine, and it had also passed in the previous run. |
Head branch was pushed to by a user without write access
Is this good to merge? auto-merge wasn't triggered because of failure(it passed after rerun) |
closes #23577