Skip to content

Commit aeed867

Browse files
committed
Add test for RT #118875
1 parent e203199 commit aeed867

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

S06-other/misc.t

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 5;
5+
plan 6;
66

77
#not really much of a test (no links to the spec either). Please improve, I only wrote what was required! --lue
88

@@ -13,5 +13,15 @@ eval_dies_ok 'pi("wtz")',"pi should not be defined to accept arguments either :)
1313
dies_ok { EVAL('a(3)') }, "this should die, no arguments defined";
1414

1515
# RT #76096
16-
lives_ok { sub foo($ where 1 --> Int) { return 42 } }, "where clause combined with --> works";
17-
lives_ok { sub foo($ where 1, $y --> Int) { return 42 } }, "where clause combined with --> works";
16+
{
17+
lives_ok { sub foo($ where 1 --> Int) { return 42 } },
18+
"where clause combined with --> works";
19+
lives_ok { sub foo($ where 1, $y --> Int) { return 42 } },
20+
"where clause combined with --> works";
21+
}
22+
23+
# RT #118875
24+
{
25+
lives_ok { sub ndr($r where ($r ||= 10) > 0 && 1) { } },
26+
'where clause followed by (non-parenthesized) expression with "&&" in it does parse';
27+
}

0 commit comments

Comments
 (0)