Skip to content

Commit 20f6891

Browse files
committed
Various redeclaration tests, including RT #108462.
1 parent 1c4cfe4 commit 20f6891

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

S32-exceptions/misc.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use Test;
33
use lib "t/spec/packages";
44
use Test::Util;
55

6-
plan 312;
6+
plan 317;
77

88
throws-like '42 +', X::AdHoc, "missing rhs of infix", message => rx/term/;
99

@@ -678,4 +678,11 @@ throws-like 'sub x(array[Int]) { }', X::Comp::BeginTime;
678678
# RT #125120
679679
throws-like 'enum X <A>; sub foo(A $a) { True', X::Syntax::Missing;
680680

681+
# RT #108462
682+
throws-like '{ our sub foo { say "OMG" } }; { our sub foo { say "WTF" } };', X::Redeclaration;
683+
throws-like 'my class C { my method foo { say "OMG" }; my method foo { say "WTF" } }', X::Redeclaration;
684+
throws-like 'my class C { our method foo { say "OMG" }; our method foo { say "WTF" } }', X::Redeclaration;
685+
throws-like 'my grammar G { my token foo { OMG }; my token foo { WTF } }', X::Redeclaration;
686+
throws-like 'my grammar G { our token foo { OMG }; our token foo { WTF } }', X::Redeclaration;
687+
681688
# vim: ft=perl6

0 commit comments

Comments
 (0)