File tree 1 file changed +5
-2
lines changed
compiler/src/dotty/tools/dotc/core/tasty
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,11 @@ class TreePickler(pickler: TastyPickler) {
85
85
case Some (label) =>
86
86
if (label != NoAddr ) writeRef(label) else pickleForwardSymRef(sym)
87
87
case None =>
88
+ // See pos/t1957.scala for an example where this can happen.
89
+ // I believe it's a bug in typer: the type of an implicit argument refers
90
+ // to a closure parameter outside the closure itself. TODO: track this down, so that we
91
+ // can eliminate this case.
92
+ report.log(i " pickling reference to as yet undefined $sym in ${sym.owner}" , sym.srcPos)
88
93
pickleForwardSymRef(sym)
89
94
}
90
95
@@ -197,8 +202,6 @@ class TreePickler(pickler: TastyPickler) {
197
202
}
198
203
else if (tpe.prefix == NoPrefix ) {
199
204
writeByte(if (tpe.isType) TYPEREFdirect else TERMREFdirect )
200
- if ! symRefs.contains(sym) && ! sym.isPatternBound && ! sym.hasAnnotation(defn.QuotedRuntimePatterns_patternTypeAnnot ) then
201
- report.error(i " pickling reference to as yet undefined $tpe with symbol ${sym}" , sym.srcPos)
202
205
pickleSymRef(sym)
203
206
}
204
207
else tpe.designator match {
You can’t perform that action at this time.
0 commit comments