New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postcircumfix:<( )> invocations get a Capture object, should just get the signature in Rakudo #2821
Comments
From @gfldexuse v6; sub somesub(){ class Foo { my $foo = Foo.new; $foo(); |
From @masak<quietfanatic> rn: class A { method postcircumfix:<( )> (A:U:) { say 3 } }; A() Meanwhile, later... <masak> re http://irclog.perlgeek.de/perl6/2012-07-07#i_5793473 -- I |
From @grondiluclass Foo { rakudo bf472b: OUTPUT«Not enough positional parameters passed; got 2 but expected 3 in method |
From @MouqI merged #112642 ("postcircumfix:<( )> refuses to deliver empty capture") and #115850 ("postcircumfix:<( )> method fails to accept several arguments") into #114026 ("postcircumfix:<( )> invocations get a Capture object, should just get the signature in Rakudo") because all of these tickets were reporting unexpected behavior where postcircumfix:<( )> was being called with capture of the arguments it was being given, rather than calling it like a normal signature. In other words, they were all reporting the same bug. This was fixed by hoelzro++ in Rakudo commit: commit d5c67dc3289df41dc4ba1a51221911f16b9aa5fb Don't pass capture to invoke/postcircumfix:<( )> when performing Type(...) If a user wants to override the behavior of Type(...), they have to know Marking as open and testneeded. |
The RT System itself - Status changed from 'new' to 'open' |
From @skidsTests added in S13-overloading/typecasting-long.t However there is a subcase still behaving magically, and two tests were fudged for it: $ perl6 -e 'class XYX { method postcircumfix:<( )>(XYX:U:) { 42 } }; XYX().perl.say;' |
From @jnthnOn Wed Sep 23 17:14:20 2015, bri@abrij.org wrote:
The form TypeName(TypeName) is (syntactically) a coercion type literal. And SomeType() is also a coercion type literal, and short for SomeType(Any). This is a parse-time distinction. The . is needed to force it to be a call. So, the behavior seen here is correct. I've updated the tests in S13-overloading/typecasting-long.t to reflect this. /jnthn |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#114026 (status was 'resolved')
Searchable as RT114026$
The text was updated successfully, but these errors were encountered: