# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #68558] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=68558 >
<jnthn> rakudo: class A { has $.foo; method new($foo) { nextwith(:$foo) } }; say A.new("OH HAI").foo <p6eval> rakudo 0d4fe0: OUTPUT«too many named arguments - 'foo' not expectedin method A::new <masak> jnthn: should that have worked? <jnthn> Hmm <jnthn> rakudo: class A { has $.foo; method new($foo) { say "ok" } }; say A.new("OH HAI") <p6eval> rakudo 0d4fe0: OUTPUT«ok1» <jnthn> I think so. I'm not quite sure what it tried to call. :-/ * masak submits rakudobug <jnthn> rakudo: class A { has $.foo; method new($foo) { callwith($foo) } }; say A.new("OH HAI").foo <p6eval> rakudo 0d4fe0: OUTPUT«Method 'foo' not found for invocant of class 'Str'» <jnthn> Oh! :-/ <masak> seems to be something to do with the invocant... <jnthn> Well <jnthn> Kinda. <jnthn> Hmm. I'm not sure off-hand why that doesn't work. <masak> but it should, so it goes on the RT pile. <jnthn> One of the annoyances of implementing callwith and nextwith is that in the case of them being used to defer to another method, they need to find and pass on the invocant. <jnthn> Whereas in the case of a wrap, they maybe don't. <masak> ah. tricky. <jnthn> Yeah. <jnthn> It'd not surprise me if we have bugs there.