On Fri Oct 09 02:14:30 2009, masak wrote: > <masak> rakudo: class A { has $.a; has $.b; method new($a, $b) { > self.new(:$a, :$b) } }; say .a, .b for A.new(42, "OH HAI") > <p6eval> rakudo daf221: OUTPUT«invalid arg type in named portion of > args [...] > <masak> above, I tried to delegate to the Object::new method
Fail. This is just a recursive call to the same method. However, Rakudo failed it in the wrong way before; it's right now. > class A { has $.a; has $.b; method new($a, $b) { self.new(:$a, :$b) } }; say .a, .b for A.new(42, "OH HAI") maximum recursion depth exceeded > <masak> another attempt: > <masak> rakudo: class A { has $.a; has $.b; method new($a, $b) { > self.Object::new(:$a, :$b) } }; say .a, .b for A.new(42, "OH HAI") > <p6eval> rakudo daf221: OUTPUT«elements() not implemented in class > 'Sub'in method A::new [...] > <masak> o.O > * masak submits rakudobug And after some s/Object/Mu/, this now works: > class A { has $.a; has $.b; method new($a, $b) { self.Mu::new(:$a, :$b) } }; say .a, .b for A.new(42, "OH HAI") 42OH HAI Giving to moritz++ for spectesting. Thanks, Jonathan