Skip to content

Commit d561d49

Browse files
committed
Add test for RT #115916
1 parent e6f9b8c commit d561d49

File tree

1 file changed

+6
-1
lines changed
  • S04-declarations

1 file changed

+6
-1
lines changed

S04-declarations/my.t

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

4-
plan 95;
4+
plan 96;
55

66
#L<S04/The Relationship of Blocks and Declarations/"declarations, all
77
# lexically scoped declarations are visible">
@@ -239,6 +239,11 @@ my $z = 42; #OK not used
239239
dies_ok { my int ($a, $b); $b = "str" }, 'Native type outside declarator sig 2/2 constrains';
240240
}
241241

242+
# RT #115916
243+
{
244+
throws_like { my (Str $rt115916) = 3 }, X::TypeCheck, 'another Type in declarator sig';
245+
}
246+
242247
{
243248
nok declare_later().defined,
244249
'Can access variable returned from a named closure that is declared below the calling position';

0 commit comments

Comments
 (0)