> On 05 Jan 2016, at 17:51, Geoffrey Broadwell (via RT) 
> <perl6-bugs-follo...@perl.org> wrote:
> 
> # New Ticket Created by  Geoffrey Broadwell 
> # Please include the string:  [perl #127170]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=127170 >
> 
> 
> Mixing a role into a subclass of Date loses defaults for the role's 
> attributes:
> 
> 08:44 < japhb> m: role Foo { has $.s = 42; has @.a = 7, 8, 9; }; class
> Bar does Foo { }; class BarDate is Date does Foo { }; dd Bar.new.a; dd
> BarDate.today.a;
> 08:44 <+camelia> rakudo-moar 75c6b9: OUTPUT«Array @!a = [7, 8,
> 9]␤Array @!a = []␤»
> 
> This worked fine as of a couple weeks ago ... I'm guessing one of the
> Temporal refactorings/optimizations broke this case?
> 
> FWIW, I noticed this because I created a "BusinessDateish" role for
> keeping track of business quarters, holidays, etc., and then created
> BusinessDate and BusinessDateTime as subclasses of Date and DateTime
> with BusinessDateish mixed in.

Fixed with fec0619 , tests added with 5e7d2ad , can be closed.



Liz

Reply via email to