Commit e4b1cfe
committed
Use names instead of type symbols when scanning for pickling annotations
When scanning for Scala pickling annotations, all annotations in all
classfiles (including those produced by the Java compiler) are considered.
Before this commit, a Type and Symbol were created for each discovered
annotation and comparared to the known Scala signature annotation types.
In certain situations (as in tests/pos/i15166), this is problematic, as
the denotation of an annotation symbol defined as a Java inner class may
be forced before the inner class table is populated and setClassInfo is
called on the class root.
Comparing names (as strings) rather than type symbols avoids this situation.
Fixes #151661 parent 64815bb commit e4b1cfe
File tree
5 files changed
+31
-9
lines changed- compiler/src/dotty/tools/dotc/core
- classfile
- tests/pos/i15166
5 files changed
+31
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | | - | |
965 | | - | |
966 | 964 | | |
967 | 965 | | |
968 | 966 | | |
969 | | - | |
970 | | - | |
971 | 967 | | |
972 | 968 | | |
973 | 969 | | |
| |||
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
1004 | 1010 | | |
1005 | 1011 | | |
1006 | 1012 | | |
1007 | | - | |
| 1013 | + | |
1008 | 1014 | | |
1009 | 1015 | | |
1010 | 1016 | | |
1011 | 1017 | | |
1012 | 1018 | | |
1013 | | - | |
| 1019 | + | |
1014 | 1020 | | |
1015 | | - | |
| 1021 | + | |
1016 | 1022 | | |
1017 | | - | |
| 1023 | + | |
1018 | 1024 | | |
1019 | | - | |
| 1025 | + | |
1020 | 1026 | | |
1021 | 1027 | | |
1022 | 1028 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments