Skip to content

BootstrapMethodError when compiling under JVM 23 #22691

Open
@som-snytt

Description

@som-snytt

Compiler version

3.6.3

Minimized code

This is tests/neg/i12456.scala compiled with

scala-cli compile --server=false -S 3.6.3 i12456.scala
//> using jvm 23
//> abusing jvm 17 // OK

object F { type T[G[X] <: X, F <: G[F]] } // error

Output (click arrow to expand)

Exception in thread "main" java.lang.BootstrapMethodError: bootstrap method initialization exception
        at dotty.tools.dotc.core.TypeApplications$.typeParams$extension(TypeApplications.scala:215)
        at dotty.tools.dotc.core.TypeApplications$.typeParamSymbols$extension(TypeApplications.scala:230)
        at dotty.tools.dotc.typer.Typer.adaptType$1(Typer.scala:4663)
        at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4794)
        at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:4040)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3662)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3666)
        at dotty.tools.dotc.typer.Typer.typedType(Typer.scala:3780)
        at dotty.tools.dotc.typer.Typer.typedTypeDef(Typer.scala:2973)
        at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:3490)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3492)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3584)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3662)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3666)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3777)
        at dotty.tools.dotc.typer.Namer.typedAheadExpr$$anonfun$1(Namer.scala:1765)
        at dotty.tools.dotc.typer.Namer.typedAhead(Namer.scala:1755)
        at dotty.tools.dotc.typer.Namer.typedAheadExpr(Namer.scala:1765)
        at dotty.tools.dotc.typer.Namer$TypeDefCompleter.completerTypeParams$$anonfun$2(Namer.scala:1038)
        at scala.collection.immutable.List.foreach(List.scala:334)
        at dotty.tools.dotc.typer.Namer$TypeDefCompleter.completerTypeParams(Namer.scala:1038)
        at dotty.tools.dotc.typer.Namer$TypeDefCompleter.typeSig(Namer.scala:1044)
        at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:990)
        at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:859)
        at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:175)
        at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:190)
        at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:192)
        at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:393)
        at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:3447)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3472)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3584)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3662)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3666)
        at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3688)
        at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3734)
        at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:3164)
        at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:3488)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3492)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3584)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3662)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3666)
        at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3688)
        at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3734)
        at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:3297)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3534)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3585)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3662)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3666)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3777)
        at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$1(TyperPhase.scala:47)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at dotty.tools.dotc.core.Phases$Phase.monitor(Phases.scala:507)
        at dotty.tools.dotc.typer.TyperPhase.typeCheck(TyperPhase.scala:53)
        at dotty.tools.dotc.typer.TyperPhase.$anonfun$4(TyperPhase.scala:99)
        at scala.collection.Iterator$$anon$6.hasNext(Iterator.scala:479)
        at scala.collection.Iterator$$anon$9.hasNext(Iterator.scala:583)
        at scala.collection.immutable.List.prependedAll(List.scala:152)
        at scala.collection.immutable.List$.from(List.scala:685)
        at scala.collection.immutable.List$.from(List.scala:682)
        at scala.collection.IterableOps$WithFilter.map(Iterable.scala:900)
        at dotty.tools.dotc.typer.TyperPhase.runOn(TyperPhase.scala:98)
        at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:343)
        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:336)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:383)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:395)
        at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:69)
        at dotty.tools.dotc.Run.compileUnits(Run.scala:395)
        at dotty.tools.dotc.Run.compileSources(Run.scala:282)
        at dotty.tools.dotc.Run.compile(Run.scala:267)
        at dotty.tools.dotc.Driver.doCompile(Driver.scala:37)
        at dotty.tools.dotc.Driver.process(Driver.scala:201)
        at dotty.tools.dotc.Driver.process(Driver.scala:169)
        at dotty.tools.dotc.Driver.process(Driver.scala:181)
        at dotty.tools.dotc.Driver.main(Driver.scala:211)
        at dotty.tools.dotc.Main.main(Main.scala)
Compilation failed// TODO add output here

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions