-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Do not compute protoFormal
if param.tpt
is empty
#18288
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was accidentally moved before of the `if (!param.tpt.isEmpty)` guard in scala@0f7c3ab#diff-8c9ece1772bd78160fc1c31e988664586c9df566a1d22ff99ef99dd6d5627a90R1534 Fixes scala#18276
nicolasstucki
added
the
backport:nominated
If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it.
label
Jul 25, 2023
nicolasstucki
commented
Jul 25, 2023
@@ -1606,32 +1606,31 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer | |||
if desugared.isEmpty then | |||
val inferredParams: List[untpd.ValDef] = | |||
for ((param, i) <- params.zipWithIndex) yield | |||
val (formalBounds, isErased) = protoFormal(i) |
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.
This line moved into the else branch. The rest should not have changed.
nicolasstucki
commented
Jul 25, 2023
) | ||
cpy.ValDef(param)(tpt = paramTpt) | ||
if isErased then param0.withAddedFlags(Flags.Erased) else param0 |
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.
And this was moved into the else
branch asl well.
jchyb
approved these changes
Jul 26, 2023
Kordyjan
added
backport:accepted
This PR needs to be backported, once it's been backported replace this tag by "backport:done"
and removed
backport:nominated
If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it.
labels
Aug 16, 2023
15 tasks
Kordyjan
added a commit
that referenced
this pull request
Aug 22, 2023
Kordyjan
added
backport:done
This PR was successfully backported.
and removed
backport:accepted
This PR needs to be backported, once it's been backported replace this tag by "backport:done"
labels
Nov 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was accidentally moved before of the
if (!param.tpt.isEmpty)
guard in 0f7c3ab#diff-8c9ece1772bd78160fc1c31e988664586c9df566a1d22ff99ef99dd6d5627a90R1534.protoFormal
has a side effect (error reporting) that caused this issue.Fixes #18276