Permalink
Browse files

BUILD should not prevent initialization of attributes it did not mention

  • Loading branch information...
1 parent 9e7fb12 commit 0dc03f461d50df3522e8d65e9721c66bcc4136c1 @moritz moritz committed Oct 1, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 S12-attributes/instance.t
View
10 S12-attributes/instance.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 134;
+plan 135;
=begin pod
@@ -606,6 +606,14 @@ is Foo7e.new.attr, 42, "default attribute value (1)";
}
+# RT #68498
+{
+ class Foo { has $.bar = "baz"; submethod BUILD {} }
+ is Foo.new.bar, 'baz',
+ 'presence of BUILD does not prevent assignment of default values';
+
+}
+
done();
# vim: ft=perl6

0 comments on commit 0dc03f4

Please sign in to comment.