This is an automatically generated mail to inform you that tests are now available in t/spec/S12-attributes/instance.t
commit 8a69002619251c8f4b03425e40a01e4b0483ee1a Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Fri Jul 16 07:56:35 2010 +0000 [t/spec] tests for RT #74186, unfudge two similar tests, and switch to planless testing git-svn-id: http://svn.pugscode.org/p...@31719 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S12-attributes/instance.t b/t/spec/S12-attributes/instance.t index 27c6d9b..0f49b1f 100644 --- a/t/spec/S12-attributes/instance.t +++ b/t/spec/S12-attributes/instance.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 129; +plan *; =begin pod @@ -26,7 +26,7 @@ class Foo1 { has $.bar; }; }, '.. checking autogenerated accessor existence'; ok($val, '... $foo.can("bar") should have returned true'); ok($foo.bar().notdef, '.. autogenerated accessor works'); - ok($foo.bar.notdef, '.. autogenerated accessor works w/out parens'); + ok($foo.bar.notdef, '.. autogenerated accessor works w/out parens'); } # L<S12/Attributes/Pseudo-assignment to an attribute declaration specifies the default> @@ -187,7 +187,6 @@ class Foo1 { has $.bar; }; class Foo7e { has $.attr = 42 } is Foo7e.new.attr, 42, "default attribute value (1)"; -#?rakudo todo 'scoping issues' { my $was_in_supplier = 0; sub forty_two_supplier() { $was_in_supplier++; 42 } @@ -576,4 +575,19 @@ is Foo7e.new.attr, 42, "default attribute value (1)"; } +# RT #74186 +{ + sub outer { 42 }; + class AttribLex { + sub inner { 23 }; + has $.outer = outer(); + has $.inner = inner(); + } + is AttribLex.new.outer, 42, 'Can use outer lexicals in attribut initialization'; + is AttribLex.new.inner, 23, 'Can use lexicals in attribut initialization'; + +} + +done_testing(); + # vim: ft=perl6