On Fri, 12 May 2017 03:04:46 -0700, elizabeth wrote:
> m: class A { has Int $.a is default(42) }; dd A.new.a
> # expected to see 42 there, not Int, so feels like "is default" on
> attrs isn't implemented?
It does work if you add =Nil
class A { has Int $.a is rw is default(42) = Nil
There does appear to be a bug, but I'd argue that it is in your code.
my %sum{Int} is default([]);
That line of code sets the default for all elements when they are first accessed
to the very same instance of an Array.
Remove the `is default([])`
To stop the warnings that would then happen
On Sat, 21 Oct 2017 08:18:46 -0700, alex.jakime...@gmail.com wrote:
> https://irclog.perlgeek.de/perl6-dev/2017-10-21#i_15334639
>
> I' think we should test that both are listed, and we can close the
> ticket.
>
I don't think we should force all future implementations to add BUILDALL.