Skip to content

Commit 3014999

Browse files
committed
Add test for suggesting enum values as types
For RT #123926.
1 parent a745629 commit 3014999

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

S32-exceptions/misc.t

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use lib "t/spec/packages";
55
use Test;
66
use Test::Util;
77

8-
plan 431;
8+
plan 432;
99

1010
throws-like '42 +', Exception, "missing rhs of infix", message => rx/term/;
1111

@@ -983,4 +983,13 @@ throws-like 'sub foo(@array ($first, @rest)) { say @rest }; foo <1 2 3>;',
983983
'X::Method::NotFound does not die with "X::Method::NotFound exception produced no message"';
984984
}
985985

986+
# RT #123926
987+
{
988+
throws-like q|enum E <Foo Bar>; sub x(Floo) {}|,
989+
X::Parameter::InvalidType,
990+
typename => 'Floo',
991+
suggestions => ['Foo'],
992+
'enum values are suggested for misspellings'
993+
}
994+
986995
# vim: ft=perl6

0 commit comments

Comments
 (0)