[perl #131290] is default() doesn't work on attributes

2017-05-12 Thread Brad Gilbert via RT
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

Re: [perl #131599] [BUG] "my %hash is default([])" misbehaves

2017-06-19 Thread Brad Gilbert via RT
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

[perl #132283] [REGRESSION] BUILDALL is listed as one of the methods, maybe that's not right (say $foo.^methods)

2017-10-21 Thread Brad Gilbert via RT
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.