@@ -30,3 +30,36 @@ If the position is in the compiler, then either report a compiler bug or
30
30
fix the problem with ` .withSpan(tree.span) ` . The following fix is an example:
31
31
32
32
- https://github.com/lampepfl/dotty/pull/6581
33
+
34
+ ## unresolved symbols in pickling
35
+
36
+ Here is the usually stacktrace for unresolved symbols in pickling:
37
+
38
+ ```
39
+ [error] java.lang.AssertionError: assertion failed: unresolved symbols: value pos (line 5565) when pickling scalatest/scalatest-test.dotty/target/scala-0.17/src_managed/test/org/scalatest/AssertionsSpec.scala
40
+ [error] at dotty.DottyPredef$.assertFail(DottyPredef.scala:16)
41
+ [error] at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:699)
42
+ [error] at dotty.tools.dotc.transform.Pickler.run$$anonfun$10$$anonfun$8(Pickler.scala:60)
43
+ [error] at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
44
+ [error] at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
45
+ [error] at scala.collection.immutable.List.foreach(List.scala:392)
46
+ [error] at dotty.tools.dotc.transform.Pickler.run$$anonfun$2(Pickler.scala:83)
47
+ [error] at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
48
+ [error] at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
49
+ [error] at scala.collection.immutable.List.foreach(List.scala:392)
50
+ [error] at dotty.tools.dotc.transform.Pickler.run(Pickler.scala:83)
51
+ [error] at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:316)
52
+ [error] at scala.collection.immutable.List.map(List.scala:286)
53
+ [error] at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:318)
54
+ [error] at dotty.tools.dotc.transform.Pickler.runOn(Pickler.scala:87)
55
+ ```
56
+
57
+ From the stack trace, we know ` pos ` at line 5565 cannot be resolved. For the
58
+ compiler, it means that the name ` pos ` (usually a local name, but could also be
59
+ a class member) is used in the code but its definition cannot be found.
60
+
61
+ A possible cause of the problem is that the macro implementation accidentally
62
+ dropped the definition of the referenced name.
63
+
64
+ If you are confident that the macro implementation is correct, then it might be
65
+ a bug of the compiler. Try to minimize the code and report a compiler bug.
0 commit comments