-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Missing context bound implicit crashes compiler under -source:3.4-migration
#19506
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
Labels
Comments
Another project Exception in thread "main" java.lang.AssertionError: assertion failed
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11)
at dotty.tools.dotc.util.Spans$Span$.start$extension(Spans.scala:45)
at dotty.tools.dotc.typer.Migrations.contextBoundParams(Migrations.scala:115)
at dotty.tools.dotc.typer.Migrations.contextBoundParams$(Migrations.scala:28)
at dotty.tools.dotc.typer.Typer.contextBoundParams(Typer.scala:120) I'll try to provide a reproducer for this case as well |
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 22, 2024
Synthesized calls for default implicits needed a using clause when the method was an implicit method, but had a context bound parameter in 3.4-migration. Also, we can't rewrite adding a `using` clause if the argument list is empty, since we are lacking precise position info. Fixes scala#19506
I hope #19512 will fix both crashes |
Kordyjan
added a commit
that referenced
this issue
Jan 23, 2024
…19512) Synthesized calls for default implicits need a using clause when the method is an implicit method with a context bound parameter, but only in in 3.4-migration. Before this PR we still generated a normal empty parameter list. Also, we can't rewrite adding a `using` clause if the argument list is empty, since we are lacking precise position info. Fixes #19506
Kordyjan
pushed a commit
that referenced
this issue
Jan 23, 2024
Synthesized calls for default implicits needed a using clause when the method was an implicit method, but had a context bound parameter in 3.4-migration. Also, we can't rewrite adding a `using` clause if the argument list is empty, since we are lacking precise position info. Fixes #19506
Kordyjan
pushed a commit
that referenced
this issue
Jan 24, 2024
Synthesized calls for default implicits needed a using clause when the method was an implicit method, but had a context bound parameter in 3.4-migration. Also, we can't rewrite adding a `using` clause if the argument list is empty, since we are lacking precise position info. Fixes #19506
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 27, 2024
Some classes get mapped to other classes at erasure. There's no need to transform their info. Fixes scala#19506
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
New regression found in Open CB for
com-lihaoyi/upickle
It was not found in the maintained CommunityBuild, because Open CB might automatically add
-source:3.x-migration
flags.The issue exists only when we combine
-source:3.4-migration
, method with context bound and at least 1 default method argument.Compiler version
Last good release: 3.4.0-RC1-bin-20240109-91db06a-NIGHTLY
First bad release: 3.4.0-RC1-bin-20240112-c50f2ff-NIGHTLY
Bisect points to 13a71ef
Minimized code
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: