We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a2bf66 commit a2c5381Copy full SHA for a2c5381
S06-signature/errors.t
@@ -2,7 +2,7 @@ use v6;
2
3
use Test;
4
5
-plan 27;
+plan 31;
6
7
=begin pod
8
@@ -83,4 +83,10 @@ throws-like 'my class A { submethod BUILD(:$!notthere = 10) { } }; A.new',
83
ok $error ~~ /^^ \h* '(Int'/, "Error mentions Int";
84
ok $error ~~ / :i call /, '... error message mentions "call"';
85
}
86
+
87
+throws-like 'sub foo($a:) { }', X::Syntax::Signature::InvocantNotAllowed;
88
+throws-like 'sub foo($a: $b) { }', X::Syntax::Signature::InvocantNotAllowed;
89
+throws-like '-> $a: { }', X::Syntax::Signature::InvocantNotAllowed;
90
+throws-like '-> $a: $b { }', X::Syntax::Signature::InvocantNotAllowed;
91
92
# vim: ft=perl6
0 commit comments