Skip Menu |
Report information
Id: 130425
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [PARSER] foo C.new: method form call tries to call `foo` routine if newline is present after ":"
Download (untitled) / with headers
text/plain 342b
$ ./perl6 -e $'class C { method foo { say 10 } }; foo C.new:\n' ===SORRY!=== Error while compiling -e Undeclared routine: foo used at line 1 $ ./perl6 -v This is Rakudo version 2016.12-122-gd35efb6 built on MoarVM version 2016.12-23-g3c5253c implementing Perl 6.c. This also appears to happen if written in a file or typed in the REPL
Download (untitled) / with headers
text/plain 873b
On Wed, 28 Dec 2016 08:30:34 -0800, cpan@zoffix.com wrote: Show quoted text
> $ ./perl6 -e $'class C { method foo { say 10 } }; foo C.new:\n' > ===SORRY!=== Error while compiling -e > Undeclared routine: > foo used at line 1 > > $ ./perl6 -v > This is Rakudo version 2016.12-122-gd35efb6 built on MoarVM version > 2016.12-23-g3c5253c > implementing Perl 6.c. > > > > This also appears to happen if written in a file or typed in the REPL
This is to spec, no? Also, did it used to do something different without the newline? It seems to consistently look for sub foo even without it. S12 says this: In case of ambiguity between indirect object notation and dot form, the nearest thing wins: dothis $obj.dothat: 1,2,3 means dothis ($obj.dothat(1,2,3)) and you must say dothis ($obj.dothat): 1,2,3 or $obj.dothat.dothis: 1,2,3 if you mean the other thing.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org