-
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
TypeTest for opaque type with wildcard argument causes unresolved symbol error #20429
Comments
tschuchortdev
added
itype:bug
itype:crash
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
May 17, 2024
Added a missing unhandled exception while running pickler on /Users/pchabelski/IdeaProjects/scala-cli-tests/compiler-repro/repro.scala
An unhandled exception was thrown in the compiler.
Please file a crash report here:
https://github.com/scala/scala3/issues/new/choose
For non-enriched exceptions, compile with -Yno-enrich-error-messages.
while compiling: /Users/pchabelski/IdeaProjects/scala-cli-tests/compiler-repro/repro.scala
during phase: pickler
mode: Mode(ImplicitsEnabled)
library version: version 2.13.12
compiler version: version 3.4.2
settings: -classpath /Users/pchabelski/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_3/3.4.2/scala3-library_3-3.4.2.jar:/Users/pchabelski/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar -d /Users/pchabelski/IdeaProjects/scala-cli-tests/compiler-repro/.scala-build/compiler-repro_b24481f081-fb1e690db3/classes/main -java-output-version 17 -sourceroot /Users/pchabelski/IdeaProjects/scala-cli-tests/compiler-repro
Exception in thread "main" java.lang.AssertionError: assertion failed: unresolved symbols: type _ (line 12) #8734 when pickling /Users/pchabelski/IdeaProjects/scala-cli-tests/compiler-repro/repro.scala
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:872)
at dotty.tools.dotc.transform.Pickler.run$$anonfun$1$$anonfun$1(Pickler.scala:136)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.transform.Pickler.run$$anonfun$1(Pickler.scala:194)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.transform.Pickler.run(Pickler.scala:194)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:354)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:360)
at dotty.tools.dotc.transform.Pickler.runOn(Pickler.scala:211)
at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:315)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
at dotty.tools.dotc.Run.runPhases$1(Run.scala:337)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:350)
at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:360)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:69)
at dotty.tools.dotc.Run.compileUnits(Run.scala:360)
at dotty.tools.dotc.Run.compileSources(Run.scala:261)
at dotty.tools.dotc.Run.compile(Run.scala:246)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:37)
at dotty.tools.dotc.Driver.process(Driver.scala:196)
at dotty.tools.dotc.Driver.process(Driver.scala:164)
at dotty.tools.dotc.Driver.process(Driver.scala:176)
at dotty.tools.dotc.Driver.main(Driver.scala:206)
at dotty.tools.dotc.Main.main(Main.scala) |
Gedochao
added
area:pickling
area:opaque-types
and removed
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Jun 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
3.3.3
Minimized code
Output (click arrow to expand)
Both examples crash with
java.lang.AssertionError: assertion failed: unresolved symbols: type _ (line 72) #122346 when pickling
. In the second example, if we writeFoo2.Opaque[?]
instead, it will compile, but only because the wildcard type is of the wrong kind? >: Nothing <: Any
, which can not legally be applied as an argument here, so that theTypeTest
is never chosen by the compiler.(line numbers may not be accurate as I copied the example from a different file)
Also see #20430.
The text was updated successfully, but these errors were encountered: