Closed
Description
minimized code
import scala.quoted._
class Test {
def foo(str: Expr[String]) given QuoteContext = '{
@deprecated($str, "")
def a = ???
}
}
Stack trace
java.lang.AssertionError: assertion failed: unresolved symbols: value str(line 2) when pickling tests/run-with-compiler/foo.scala while compiling tests/run-with-compiler/foo.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: unresolved symbols: value str(line 2) when pickling tests/run-with-compiler/foo.scala
at dotty.DottyPredef$.assertFail(DottyPredef.scala:16)
at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:695)
at dotty.tools.dotc.core.quoted.PickledQuotes$.pickle(PickledQuotes.scala:90)
at dotty.tools.dotc.core.quoted.PickledQuotes$.pickleQuote(PickledQuotes.scala:32)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.pickleAsTasty$1(ReifyQuotes.scala:237)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.pickledQuote(ReifyQuotes.scala:249)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.transformQuotation(ReifyQuotes.scala:195)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:94)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.transform(ReifyQuotes.scala:410)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1256)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:118)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:77)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:127)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.transform(ReifyQuotes.scala:410)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1262)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:118)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:77)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:127)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.transform(ReifyQuotes.scala:410)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:98)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:77)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:127)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.transform(ReifyQuotes.scala:410)
at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:52)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:59)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:109)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:77)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:127)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.transform(ReifyQuotes.scala:410)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1332)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:102)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:77)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:127)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.transform(ReifyQuotes.scala:410)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$2(Trees.scala:1352)
at scala.collection.immutable.List.mapConserve(List.scala:179)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1352)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transformStats(Trees.scala:1350)
at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1338)
at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:102)
at dotty.tools.dotc.transform.TreeMapWithStages.mapOverTree$1(TreeMapWithStages.scala:77)
at dotty.tools.dotc.transform.TreeMapWithStages.transform(TreeMapWithStages.scala:127)
at dotty.tools.dotc.transform.ReifyQuotes$QuoteReifier.transform(ReifyQuotes.scala:410)
at dotty.tools.dotc.transform.ReifyQuotes$$anon$1.transform(ReifyQuotes.scala:94)
at dotty.tools.dotc.transform.MacroTransform.run(MacroTransform.scala:21)
at dotty.tools.dotc.transform.ReifyQuotes.run(ReifyQuotes.scala:90)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:316)
at scala.collection.immutable.List.map(List.scala:286)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:318)
at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:158)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)
at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:198)
at dotty.tools.dotc.Run.runPhases$5(Run.scala:170)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:178)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:65)
at dotty.tools.dotc.Run.compileUnits(Run.scala:185)
at dotty.tools.dotc.Run.compileSources(Run.scala:120)
at dotty.tools.dotc.Run.compile(Run.scala:104)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
at dotty.tools.dotc.Driver.process(Driver.scala:180)
at dotty.tools.dotc.Driver.process(Driver.scala:149)
at dotty.tools.dotc.Driver.process(Driver.scala:161)
at dotty.tools.dotc.Driver.main(Driver.scala:188)
at dotty.tools.dotc.Main.main(Main.scala)```
</details>