Skip to content

Commit

Permalink
Various redeclaration tests, including RT #108462.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 29, 2015
1 parent 1c4cfe4 commit 20f6891
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S32-exceptions/misc.t
Expand Up @@ -3,7 +3,7 @@ use Test;
use lib "t/spec/packages";
use Test::Util;

plan 312;
plan 317;

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

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

# RT #108462
throws-like '{ our sub foo { say "OMG" } }; { our sub foo { say "WTF" } };', X::Redeclaration;
throws-like 'my class C { my method foo { say "OMG" }; my method foo { say "WTF" } }', X::Redeclaration;
throws-like 'my class C { our method foo { say "OMG" }; our method foo { say "WTF" } }', X::Redeclaration;
throws-like 'my grammar G { my token foo { OMG }; my token foo { WTF } }', X::Redeclaration;
throws-like 'my grammar G { our token foo { OMG }; our token foo { WTF } }', X::Redeclaration;

# vim: ft=perl6

0 comments on commit 20f6891

Please sign in to comment.