Commit 888c24b
committed
Fix ExpandPrivate when compiling from TASTY
When compiling from TASTY, `ctx.source.file` will be the TASTY file
corresponding to the current compilation unit, this will never match
`d.symbol.sourceFile` whose value is set from the `SourceFile`
annotation in the TASTY tree. Fixed by using `ctx.owner.sourceFile`
instead.
The added test, `anonBridge.scala` needs this fix to work. It also needs
the previous work done in this PR to give positions to unpickled
symbols, otherwise it crashes in `Typer#assertPositioned` because
`Bridges#addBridge` creates a tree whose position comes from a symbol.1 parent 87ffb88 commit 888c24b
File tree
2 files changed
+5
-2
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/pos-from-tasty
2 files changed
+5
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
| 93 | + | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments