-
Notifications
You must be signed in to change notification settings - Fork 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
Regression in typer when copying case class with generic parameters #15154
Labels
Comments
WojciechMazur
added
itype:bug
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
May 10, 2022
nicolasstucki
added
regression
This worked in a previous version but doesn't anymore
and removed
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
May 10, 2022
This issue started in 3ab18a9. |
This looks like the same problematic code pattern as SnippetChecker.scala mentioned in the commit message of 3ab18a9, so the same workaround applies: pass an explicit type argument to map: seq.map[TypeAdapter[?]]{ f =>
typeAdapterOf(f) match {
case ota: OptionTypeAdapter[_] => ota.copy(nullIsNone = true)
case jota: JavaOptionalTypeAdapter[_] => jota.copy(nullIsNone = true)
case other => other
}
} Closing, since there is no plan to fix this so far. |
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 9, 2022
This now works with level checking on instantiation Fixes scala#15154
Merged
odersky
added a commit
that referenced
this issue
Sep 9, 2022
This now works with level checking on instantiation Fixes #15154
mpollmeier
pushed a commit
to mpollmeier/dotty
that referenced
this issue
Oct 16, 2022
This now works with level checking on instantiation Fixes scala#15154
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
Fails since 3.1.2
Minimized code
Minimized using scala-cli
Output
Expectation
Should compile like in the Scala 3.1.1 or earlier
Should not need explicit casting of
copy
result to satisfy compilerThe text was updated successfully, but these errors were encountered: