You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exception occurred while compiling ../pg-dotc/Main.scala
java.lang.AssertionError: assertion failed: unresolved symbols: value exprs(line 0) when pickling ../pg-dotc/Main.scala while compiling ../pg-dotc/Main.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: unresolved symbols: value exprs(line 0) when pickling ../pg-dotc/Main.scala
at dotty.DottyPredef$.assertFail(DottyPredef.scala:16)
at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:695)
at dotty.tools.dotc.transform.Pickler.run$$anonfun$10$$anonfun$8(Pickler.scala:60)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:392)
at dotty.tools.dotc.transform.Pickler.run$$anonfun$2(Pickler.scala:83)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:392)
at dotty.tools.dotc.transform.Pickler.run(Pickler.scala:83)
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.transform.Pickler.runOn(Pickler.scala:87)
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)
[error] Nonzero exit code returned from runner: 1
[error] (dotty-compiler /Compile/ runMain) Nonzero exit code returned from runner: 1
[error] Totaltime: 8 s, completed Aug12, 20192:07:51PM
To make it compile, make the parameter to inner by-name:
In my original use case, it was a mistake for me not to make it by-name. However, due to the obscure crash, I was not able to see that mistake right away.
This is already the second time I encounter unintuitive behaviour of underlyingArgument (don't remember the first time, but it was likely the same thing). I expected it to just return an immediate child node of the callee. However, it seems that it performs a deep traversal and transformation of the callee tree. If you debug outerImpl as follows:
I believe underlyingArgument should do just that – pill off the "outer layer" of the tree, returning the meaningful child. If the user really wants the current logic, we should make it into a separate method with a name reflecting its deep nature.
/cc @liufengyun since you looked into the issues with unresolved symbols while pickling recently
The text was updated successfully, but these errors were encountered:
We are supposed to also replace exprs with its underlyingArgument. We might be missing that tree when we try to do that. Or maybe not performing the recursive transformation completely.
Fixscala#6140, fixscala#6772, fixscala#7030, fixscala#7892, fixscala#7997, fixscala#8651 and improve scala#8100.
Differences with previous implementation
* Only track and check levels within quotes or splices
* Track levels of all symbols not at level 0
* Split level checking into specialized variants for types and terms (healType/healTermType)
* Detect inconsistent types rather than try to detect consistent ones
* Check/heal term inconsistencies only on leaf nodes (TypeTree, RefTree, Ident, This)
Fixscala#6140, fixscala#6772, fixscala#7030, fixscala#7892, fixscala#7997, fixscala#8651 and improve scala#8100.
Differences with previous implementation
* Only track and check levels within quotes or splices
* Track levels of all symbols not at level 0
* Split level checking into specialized variants for types and terms (healType/healTermType)
* Detect inconsistent types rather than try to detect consistent ones
* Check/heal term inconsistencies only on leaf nodes (TypeTree, RefTree, Ident, This)
Macros:
Test:
Crash
To make it compile, make the parameter to
inner
by-name:In my original use case, it was a mistake for me not to make it by-name. However, due to the obscure crash, I was not able to see that mistake right away.
This is already the second time I encounter unintuitive behaviour of
underlyingArgument
(don't remember the first time, but it was likely the same thing). I expected it to just return an immediate child node of the callee. However, it seems that it performs a deep traversal and transformation of the callee tree. If you debugouterImpl
as follows:Original will be
Underlying will be
Notice how the following code is not present in Underlying:
Which is the likely cause of the crash.
I believe
underlyingArgument
should do just that – pill off the "outer layer" of the tree, returning the meaningful child. If the user really wants the current logic, we should make it into a separate method with a name reflecting its deep nature./cc @liufengyun since you looked into the issues with unresolved symbols while pickling recently
The text was updated successfully, but these errors were encountered: