Commit 35d159a
committed
Fix #15514 in Parser
There was a missing set of parentheses in parser which caused a lookahead
from INTERPOLATIONID, which should be illegal, since the lookahead then
migth set the next TokenData which is subsequently overwritten by reset.
We now demand that lookahead cannot be called if the current token is
a INTERPOLATIONID.
There were two many variants `lookahead` in the Scanner, which only differered
in camelCase or not. Rename one to`peekAhead` to make the code clearer.1 parent 0059d1d commit 35d159a
File tree
3 files changed
+19
-12
lines changed- compiler/src/dotty/tools/dotc/parsing
- tests/pos
3 files changed
+19
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3957 | 3957 | | |
3958 | 3958 | | |
3959 | 3959 | | |
3960 | | - | |
3961 | | - | |
| 3960 | + | |
| 3961 | + | |
3962 | 3962 | | |
3963 | 3963 | | |
3964 | 3964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | | - | |
| 665 | + | |
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
693 | | - | |
| 693 | + | |
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
698 | | - | |
| 698 | + | |
699 | 699 | | |
700 | 700 | | |
701 | | - | |
702 | 701 | | |
703 | 702 | | |
704 | 703 | | |
| |||
717 | 716 | | |
718 | 717 | | |
719 | 718 | | |
720 | | - | |
| 719 | + | |
721 | 720 | | |
722 | 721 | | |
723 | 722 | | |
724 | 723 | | |
725 | | - | |
| 724 | + | |
726 | 725 | | |
727 | 726 | | |
728 | 727 | | |
| |||
733 | 732 | | |
734 | 733 | | |
735 | 734 | | |
736 | | - | |
| 735 | + | |
737 | 736 | | |
738 | 737 | | |
739 | 738 | | |
| |||
1083 | 1082 | | |
1084 | 1083 | | |
1085 | 1084 | | |
1086 | | - | |
| 1085 | + | |
1087 | 1086 | | |
1088 | | - | |
| 1087 | + | |
1089 | 1088 | | |
1090 | | - | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
1091 | 1093 | | |
1092 | 1094 | | |
1093 | 1095 | | |
| |||
1279 | 1281 | | |
1280 | 1282 | | |
1281 | 1283 | | |
| 1284 | + | |
1282 | 1285 | | |
1283 | 1286 | | |
1284 | 1287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments