Skip to content

Commit

Permalink
Tests for RT #125591.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jul 15, 2015
1 parent c3f0861 commit f21cb19
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S12-methods/attribute-params.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 13;
plan 16;

class Ap {
has $.s;
Expand Down Expand Up @@ -34,4 +34,11 @@ is $x.a.join('|'), '1|2', 'slurpy array param set correctly';
is $x.ssh(a=> 1, b => 2), 15, 'slurpy hash attributive paramed method returns the right thing';
is $x.h<b a>.join('|'), '2|1', 'slurpy hash param set correctly';

# RT #125591
throws-like 'my class C { has $.x; submethod BUILD(:$.x) {} }',
X::Syntax::VirtualCall, call => '$.x';

throws-like 'sub optimal($.x) { }', X::Syntax::NoSelf, variable => '$.x';
throws-like 'sub optimal($!x) { }', X::Syntax::NoSelf, variable => '$!x';

# vim: ft=perl6

0 comments on commit f21cb19

Please sign in to comment.