Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit a2787a74ec820f2d1ed790e42a413d4ca12b2946 1 parent 81ceef9
jnthn authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 S12-attributes/instance.t
View
13 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
Please sign in to comment.
Something went wrong with that request. Please try again.