Commit d81567b
committed
Make ClassfileParser robust for directly reading Java inner classes
Usually when the ClassfileParser reads a classfile for a Java inner
class, the entry point is the outer class, the inner symbol is
created in `enterOwnInnerClasses`.
But when scanning the classpath, a Symbol is also created because
of the presence of the `C$I.class` classfile. (This symbol is later
unlinked and marked invalid.) When invoking the classfile parser on
this symbol directly, reading generic signatures can fail because
they may refer to type variables defined in the outer class:
```
class C1<X> {
// signature: Lp/C1<TX;>; -- `TX;` references outer `X`
class I extends C1<X> { }
}
```1 parent 24014e9 commit d81567b
File tree
4 files changed
+96
-20
lines changed- src/compiler/scala/tools/nsc/symtab/classfile
- test/files/run
- t9152
4 files changed
+96
-20
lines changedLines changed: 29 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
630 | 639 | | |
631 | 640 | | |
632 | 641 | | |
| |||
749 | 758 | | |
750 | 759 | | |
751 | 760 | | |
752 | | - | |
| 761 | + | |
753 | 762 | | |
754 | 763 | | |
755 | 764 | | |
| |||
1295 | 1304 | | |
1296 | 1305 | | |
1297 | 1306 | | |
1298 | | - | |
| 1307 | + | |
1299 | 1308 | | |
1300 | 1309 | | |
1301 | 1310 | | |
| |||
1335 | 1344 | | |
1336 | 1345 | | |
1337 | 1346 | | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
1354 | 1365 | | |
1355 | | - | |
1356 | | - | |
1357 | 1366 | | |
1358 | 1367 | | |
1359 | 1368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments