File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
compiler/src/dotty/tools/dotc/core/tasty Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -265,11 +265,7 @@ class TreeUnpickler(reader: TastyReader,
265
265
case Some (sym) =>
266
266
sym
267
267
case None =>
268
- val ownerInTree = ownerTree.findOwner(addr)
269
- val ctx1 =
270
- if ownerInTree.exists then ctx.withOwner(ownerInTree)
271
- else ctx // this is a pickled expression and the owner is located outside the expression (i.e. pickled quote)
272
- val sym = forkAt(addr).createSymbol()(using ctx1)
268
+ val sym = forkAt(addr).createSymbol()(using ctx.withOwner(ownerTree.findOwner(addr)))
273
269
report.log(i " forward reference to $sym" )
274
270
sym
275
271
}
@@ -1624,7 +1620,8 @@ class TreeUnpickler(reader: TastyReader,
1624
1620
try cs match {
1625
1621
case ot :: cs1 =>
1626
1622
if (ot.addr.index == addr.index) {
1627
- current
1623
+ // this is a pickled expression and the owner is located outside the expression (i.e. pickled quote)
1624
+ ctx.owner
1628
1625
}
1629
1626
else if (ot.addr.index < addr.index && addr.index < ot.end.index)
1630
1627
search(ot.children, reader.symbolAt(ot.addr))
You can’t perform that action at this time.
0 commit comments