Commit 3b882c2
committed
ClassfileParser: correct types for annotation arguments
As specified in https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.16.1,
an annotation argument of type boolean, byte, char or short will be represented
as a CONSTANT_Integer in the classfile, so when we parse it we get an
Int, but before this commit we did not convert this Int to the correct
type for the annotation argument, thus creating ill-typed trees.1 parent 1293e2f commit 3b882c2
File tree
1 file changed
+19
-4
lines changed- compiler/src/dotty/tools/dotc/core/classfile
1 file changed
+19
-4
lines changedLines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
434 | | - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
435 | 436 | | |
436 | 437 | | |
437 | 438 | | |
| |||
829 | 830 | | |
830 | 831 | | |
831 | 832 | | |
832 | | - | |
| 833 | + | |
833 | 834 | | |
834 | 835 | | |
835 | 836 | | |
| |||
1045 | 1046 | | |
1046 | 1047 | | |
1047 | 1048 | | |
1048 | | - | |
| 1049 | + | |
1049 | 1050 | | |
1050 | 1051 | | |
1051 | 1052 | | |
1052 | 1053 | | |
1053 | 1054 | | |
1054 | 1055 | | |
1055 | 1056 | | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1056 | 1071 | | |
1057 | 1072 | | |
1058 | 1073 | | |
| |||
0 commit comments