Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[t/spec] Test for binding to an attribute.
git-svn-id: http://svn.pugscode.org/pugs@28066 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
jnthn committed Aug 25, 2009
1 parent 81ceef9 commit a2787a7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S12-attributes/instance.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 129;
plan 130;

=begin pod
Expand Down Expand Up @@ -543,4 +543,15 @@ is eval('Foo7e.new.attr'), 42, "default attribute value (1)";
'dies: modify instance attribute via class method call';
}

# Binding an attribute (was RT #64850)
{
class RT64850 {
has $.x;
method foo { $!x := 42 }
}
my $a = RT64850.new;
$a.foo;
is $a.x, 42, 'binding to an attribute works';
}

# vim: ft=perl6

0 comments on commit a2787a7

Please sign in to comment.