Skip to content

Commit 66387b5

Browse files
committed
restrict do {} obs message to while/until
1 parent e20e129 commit 66387b5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

STD.pm6

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,8 +1336,10 @@ grammar P6 is STD {
13361336
{
13371337
my $sp = $<EXPR><statement_prefix>;
13381338
if $sp and $sp<sym> eq 'do' {
1339-
my $s = $<statement_mod_loop>[0]<sym>;
1340-
.obs("do...$s" ,"repeat...$s");
1339+
my $s = $<statement_mod_loop>[0]<sym>;
1340+
if $s eq 'while' or $s eq 'until' {
1341+
.obs("do...$s" ,"repeat...$s");
1342+
}
13411343
}
13421344
}
13431345
| <statement_mod_cond>

0 commit comments

Comments
 (0)