Skip to content

Commit 63400a4

Browse files
committed
reenable the undeclared typename error, timotimo++
1 parent 1f19235 commit 63400a4

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

STD.pm6

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,25 +1661,26 @@ grammar P6 is STD {
16611661
:dba('scoped declarator')
16621662
<.ws>
16631663
[
1664-
| <declarator>
1665-
| <regex_declarator>
1666-
| <package_declarator>
1664+
| <declarator><.ws>
1665+
| <regex_declarator><.ws>
1666+
| <package_declarator><.ws>
16671667
| [<typename><.ws>]+
16681668
{
16691669
my $t = $<typename>;
16701670
@$t > 1 and.sorry("Multiple prefix constraints not yet supported");
16711671
$*OFTYPE = $t[0];
16721672
}
1673-
<multi_declarator>
1674-
| <multi_declarator>
1675-
] <.ws>
1676-
|| <?before <[A..Z]>><longname>{
1673+
<multi_declarator><.ws>
1674+
| <multi_declarator><.ws>
1675+
| {} <longname> {
16771676
my $t = $<longname>.Str;
1678-
if not.is_known($t) {
1677+
say "HERE $t";
1678+
if ord($t) < 97 and not.is_known($t) {
16791679
.sorry("In $*SCOPE declaration, typename '$t' must be predeclared (or marked as declarative with :: prefix)");
16801680
}
16811681
}
16821682
<!> # drop through
1683+
]
16831684
|| <.panic: "Malformed $*SCOPE">
16841685
}
16851686

0 commit comments

Comments
 (0)