# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #63770] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=63770 >
<ruoso> hmm <ruoso> something's wrong there <ruoso> rakudo: class A { method a { { .say } }; method foo { $.a(1); $.a.(2) } }; my $a = A.new; $a.foo <p6eval> rakudo 95ce39: OUTPUT«Use of uninitialized valueinvoke() not implemented in class 'Integer [...] <ruoso> there it is... <ruoso> rakudo is making something wrong <masak> what just happened? :) <moritz_> uhm <masak> how can that even dispatch? <ruoso> rakudo is probably assuming something because of "has $.a" <moritz_> method a { { .say } } <moritz_> that's supposed to return a closure, right? <ruoso> yes * masak submits rakudobug <ruoso> $.a(1) sends (1) as argument to method a <ruoso> $.a.(1) expects the return of a to be a callable, and then send 1 as an argument to that * SamB pretends not to understand the difference ;-P <ruoso> masak, and btw... <ruoso> there is *always* a method involved <masak> ruoso: no, $.a.(1) is the same as $.a(1) <ruoso> unless you use $!a <masak> ruoso: right. <ruoso> masak, so, if method a accepts an argument, how do you send it? <masak> ruoso: you're assuming that $.a.(1) makes two calls, one to a and one to its returned closure. I don't see why you assume that. <ruoso> because of the two dots <masak> ruoso: but .() and () are equivalent, no? <moritz_> unless where they are not :-) <SamB> masak: isn't that what the entire discussion has been about ? <masak> SamB: yes. <masak> we're starting in on the second lap round the circle now. <ruoso> masak, .() and () are equivalent when you're dealing with variables <moritz_> I think it would DWIM to make $.a.() being the same as $.a().a() <ruoso> $foo() and $foo.() are the same <moritz_> but I have no idea if it's specced that way * masak gives up <masak> we're evidently on uncharted territory here <masak> I'm pasting this whole discussion into the rakudobug