Skip to content

Commit 40fa9bf

Browse files
committed
Tests covering RT #123623.
1 parent 6ea448b commit 40fa9bf

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

S06-multi/type-based.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use v6;
22
use Test;
3-
plan 61;
3+
plan 62;
44

55
# type based dispatching
66
#
@@ -247,4 +247,10 @@ is(mmd(1..3), 2, 'Slurpy MMD to listop via list');
247247
ok try { main '2+1i' } eqv 2+1i, "can distinguish Complex-like string in main";
248248
}
249249

250+
# RT #123623
251+
{
252+
multi foo($a where { $_ == False } = True) { }
253+
lives-ok { foo(False) }, 'Combination of where clause plus default parses correctly';
254+
}
255+
250256
# vim: ft=perl6

S14-roles/parameterized-type.t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 31;
5+
plan 32;
66

77
=begin pod
88
@@ -117,4 +117,8 @@ eval-dies-ok 'role ABCD[EFGH] { }', 'role with undefined type as parameter dies'
117117
'error message mentions expected type when a typed array in a signature fails to bind';
118118
}
119119

120+
# RT #123623
121+
lives-ok { EVAL 'my role A [ :$bs where { True } = 512] { }; class B does A { }' },
122+
'role with where clause and default in parametric signature works out OK';
123+
120124
# vim: ft=perl6

0 commit comments

Comments
 (0)