Skip to content

Commit

Permalink
Add test for RT #88748
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Oct 14, 2014
1 parent ae245a6 commit 7396503
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S32-exceptions/misc.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 270;
plan 271;

#?DOES 1
throws_like { Buf.new().Str }, X::Buf::AsStr, method => 'Str';;
Expand Down Expand Up @@ -550,4 +550,12 @@ throws_like '&[doesntexist]', X::Comp, # XXX probably needs exception type fix
message => 'Term definition requires an initializer';
}

#RT #88748
{
throws_like { EVAL q[given 42 { when SomeUndeclaredType { 1 }; default { 0 } }] },
X::Comp::Group,
'adequate error message when undeclared type is used in "when" clause',
message => { m/'Function SomeUndeclaredType needs parens to avoid gobbling block'/ };
}

# vim: ft=perl6

0 comments on commit 7396503

Please sign in to comment.