Fails to compile and throws an assertion error instead.
java.lang.AssertionError: assertion failed: unresolved symbols: type F (line 16) #18013 when pickling /tmp/scastie3760419140958137017/src/main/scala/main.scala
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:777)
at dotty.tools.dotc.quoted.PickledQuotes$.pickle(PickledQuotes.scala:167)
at dotty.tools.dotc.quoted.PickledQuotes$.pickleQuote(PickledQuotes.scala:36)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.pickleAsTasty$1(PickleQuotes.scala:221)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.pickledQuote(PickleQuotes.scala:296)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transformQuotation(PickleQuotes.scala:141)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:118)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1464)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1500)
at scala.collection.immutable.List.mapConserve(List.scala:472)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1500)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformSub(Trees.scala:1504)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1430)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:103)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1410)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:95)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:142)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transformWithCapturer(PickleQuotes.scala:412)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.body$3(PickleQuotes.scala:393)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.makeLambda$$anonfun$1(PickleQuotes.scala:403)
at dotty.tools.dotc.ast.tpd$.DefDef(tpd.scala:285)
at dotty.tools.dotc.ast.tpd$.Closure(tpd.scala:120)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.makeLambda(PickleQuotes.scala:403)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.splitSplice(PickleQuotes.scala:433)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transformSplice(PickleQuotes.scala:315)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:129)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:103)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:513)
at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:111)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:513)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1473)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:513)
at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1410)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:95)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:142)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1410)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:95)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:142)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.splitQuote(PickleQuotes.scala:428)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transformQuotation(PickleQuotes.scala:136)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:118)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1390)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1396)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:93)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:142)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:103)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
at dotty.tools.dotc.ast.TreeMapWithImplicits.recur$1(TreeMapWithImplicits.scala:35)
at dotty.tools.dotc.ast.TreeMapWithImplicits.recur$1(TreeMapWithImplicits.scala:41)
at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:54)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:111)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1473)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:111)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1473)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1484)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:89)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:154)
at dotty.tools.dotc.transform.PickleQuotes$QuoteReifier.transform(PickleQuotes.scala:515)
at dotty.tools.dotc.transform.PickleQuotes$$anon$1.transform(PickleQuotes.scala:94)
at dotty.tools.dotc.transform.MacroTransform.run(MacroTransform.scala:21)
at dotty.tools.dotc.transform.PickleQuotes.run(PickleQuotes.scala:90)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:308)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:309)
at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:261)
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$5(Run.scala:272)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:280)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:68)
at dotty.tools.dotc.Run.compileUnits(Run.scala:289)
at dotty.tools.dotc.Run.compileSources(Run.scala:222)
at dotty.tools.dotc.Run.compile(Run.scala:206)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
at dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:88)
at dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
I'm not sure if this should work or not, but I do have a use case that I'm trying to fulfill using something similar to what follows.
Compiler version
3.1.0-RC1
Minimized code
Output (click arrow to expand)
Fails to compile and throws an assertion error instead.