Permalink
Browse files

[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...
1 parent 81ceef9 commit a2787a74ec820f2d1ed790e42a413d4ca12b2946 jnthn committed Aug 25, 2009
Showing with 12 additions and 1 deletion.
  1. +12 −1 S12-attributes/instance.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 129;
+plan 130;
=begin pod
@@ -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.