Open
Description
Crash occurs under AdoptOpenJDK 11.0.11. Tried on JDK16 and no crash.
Compiler version
v3.2.2
v3.3.0-RC4
Minimized code
DFBits.scala
package crash
object DFBits:
trait CompareCheck
given CompareCheck with {}
def foo(dfType: DFType): Unit = baz(dfType)
DFType.scala
package crash
final class DFType
object DFType:
export DFBits.given
trait TC[T]
object TC:
given ofDFType[T <: DFType]: TC[T] = ???
import scala.quoted.*
transparent inline given ofTuple[T <: NonEmptyTuple]: TC[T] = ${ ofTupleMacro[T] }
def ofTupleMacro[T <: NonEmptyTuple](using Quotes, Type[T]): Expr[TC[T]] =
import quotes.reflect.*
val AppliedType(fun, args) = TypeRepr.of[T]: @unchecked
'{ ??? }
end ofTupleMacro
end DFType
def baz[T](t: T)(using tc: DFType.TC[T]): Unit = ???
Output (click arrow to expand)
[error] java.lang.NoClassDefFoundError: crash/DFBits
[error] java.base/java.lang.Class.getDeclaringClass0(Native Method)
[error] java.base/java.lang.Class.getEnclosingClass(Class.java:1517)
[error] java.base/java.lang.Class.getCanonicalName0(Class.java:1625)
[error] java.base/java.lang.Class.getCanonicalName(Class.java:1610)
[error] dotty.tools.dotc.quoted.Interpreter.$anonfun$4(Interpreter.scala:252)
[error] scala.collection.ArrayOps$.lastIndexWhere$extension(ArrayOps.scala:723)
[error] dotty.tools.dotc.quoted.Interpreter.stopIfRuntimeException(Interpreter.scala:251)
[error] dotty.tools.dotc.quoted.Interpreter.interpretedStaticMethodCall(Interpreter.scala:174)
[error] dotty.tools.dotc.quoted.Interpreter.interpretTree(Interpreter.scala:76)
[error] dotty.tools.dotc.transform.Splicer$SpliceInterpreter.interpretTree(Splicer.scala:247)
[error] dotty.tools.dotc.quoted.Interpreter.interpretTree$$anonfun$2(Interpreter.scala:95)
[error] dotty.tools.dotc.transform.Splicer$.$anonfun$2(Splicer.scala:60)
[error] scala.Option.fold(Option.scala:263)
[error] dotty.tools.dotc.transform.Splicer$.splice(Splicer.scala:60)
[error] dotty.tools.dotc.inlines.Inliner.dotty$tools$dotc$inlines$Inliner$$expandMacro(Inliner.scala:1042)
[error] dotty.tools.dotc.inlines.Inliner$InlineTyper.typedApply(Inliner.scala:818)
[error] dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2928)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2991)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.inlines.Inliner$InlineTyper.typedUnadapted(Inliner.scala:904)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3055)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
[error] dotty.tools.dotc.inlines.Inliner.inlined(Inliner.scala:671)
[error] dotty.tools.dotc.inlines.Inlines$InlineCall.expand(Inlines.scala:444)
[error] dotty.tools.dotc.inlines.Inlines$.inlineCall(Inlines.scala:151)
[error] dotty.tools.dotc.typer.Typer.adaptNoArgsOther$1(Typer.scala:3807)
[error] dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3907)
[error] dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4120)
[error] dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3435)
[error] dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3446)
[error] dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4107)
[error] dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3435)
[error] dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1079)
[error] dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:806)
[error] dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:115)
[error] dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1201)
[error] dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1300)
[error] dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1470)
[error] dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1498)
[error] dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1506)
[error] dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1531)
[error] dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:1022)
[error] dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:806)
[error] dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:115)
[error] dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:872)
[error] dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:806)
[error] dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:115)
[error] dotty.tools.dotc.typer.Typer.implicitArgs$1(Typer.scala:3585)
[error] dotty.tools.dotc.typer.Typer.addImplicitArgs$1(Typer.scala:3621)
[error] dotty.tools.dotc.typer.Typer.adaptNoArgsImplicitMethod$1(Typer.scala:3697)
[error] dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3886)
[error] dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4120)
[error] dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3435)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
[error] dotty.tools.dotc.typer.Typer.$anonfun$49(Typer.scala:2382)
[error] dotty.tools.dotc.inlines.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:249)
[error] dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2382)
[error] dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2904)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2990)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
[error] dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3084)
[error] dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3130)
[error] dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:2562)
[error] dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:2916)
[error] dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2920)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2990)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
[error] dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3084)
[error] dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3130)
[error] dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2692)
[error] dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2961)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2991)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3058)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3062)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3174)
[error] dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$1(TyperPhase.scala:44)
[error] dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$adapted$1(TyperPhase.scala:54)
[error] scala.Function0.apply$mcV$sp(Function0.scala:42)
[error] dotty.tools.dotc.core.Phases$Phase.monitor(Phases.scala:437)
[error] dotty.tools.dotc.typer.TyperPhase.typeCheck(TyperPhase.scala:54)
[error] dotty.tools.dotc.typer.TyperPhase.runOn$$anonfun$3(TyperPhase.scala:88)
[error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
[error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
[error] scala.collection.immutable.List.foreach(List.scala:333)
[error] dotty.tools.dotc.typer.TyperPhase.runOn(TyperPhase.scala:88)
[error] dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:247)
[error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
[error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
[error] scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1321)
[error] dotty.tools.dotc.Run.runPhases$1(Run.scala:263)
[error] dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:271)
[error] dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:280)
[error] dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
[error] dotty.tools.dotc.Run.compileUnits(Run.scala:280)
[error] dotty.tools.dotc.Run.compileUnits(Run.scala:201)
[error] dotty.tools.dotc.Driver.finish(Driver.scala:56)
[error] dotty.tools.dotc.Driver.doCompile(Driver.scala:36)
[error] dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:88)
[error] dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
[error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:193)
[error] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:248)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:183)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163)
[error] sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:211)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:534)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:534)
[error] sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:179)
[error] sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:177)
[error] sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:463)
[error] sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
[error] sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
[error] sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
[error] sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:263)
[error] sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:418)
[error] sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:506)
[error] sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:405)
[error] sbt.internal.inc.Incremental$.apply(Incremental.scala:171)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:534)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:488)
[error] sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:425)
[error] sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
[error] sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2363)
[error] sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2313)
[error] sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:30)
[error] sbt.internal.io.Retry$.apply(Retry.scala:46)
[error] sbt.internal.io.Retry$.apply(Retry.scala:28)
[error] sbt.internal.io.Retry$.apply(Retry.scala:23)
[error] sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:30)
[error] sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2311)
[error] scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] sbt.Execute.work(Execute.scala:291)
[error] sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] java.base/java.lang.Thread.run(Thread.java:829)
[error]
[error] stack trace is suppressed; run last core / Compile / compileIncremental for the full output
[error] (core / Compile / compileIncremental) java.lang.NoClassDefFoundError: crash/DFBits