Skip to content

Commit

Permalink
Test my &x; sub x {} throws useful error
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Feb 14, 2017
1 parent 2685afc commit 5550e4c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion S06-multi/proto.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 26;
plan 27;

# Test for proto definitions
class A { }
Expand Down Expand Up @@ -144,4 +144,8 @@ throws-like 'bar(41)', Exception, 'impossible dispatch failed (anon cap)';
], X::TypeCheck::Argument, 'proto signature is checked, not just that of the candidates';
}

# https://irclog.perlgeek.de/perl6/2017-02-13#i_14093827
throws-like my &x; sub x {}, X::Redeclaration,
'my &x; sub x {} throws useful error';

# vim: ft=perl6

0 comments on commit 5550e4c

Please sign in to comment.