Skip Menu |
Report information
Id: 128602
Status: new
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: [LTA] Error on undetached range of non-Int
Download (untitled) / with headers
text/plain 888b
When an undetached method is called on a range of an Int, you get a nice message about precedence: BrokenRobot m: my $x = ^5.grep: *.is-prime # LTA camelia rakudo-moar d075c8: OUTPUT«Potential difficulties:␤ Precedence of ^ is looser than method call; please parenthesize␤ at <tmp>:1␤ ------> 3my $x = ^57⏏5.grep: *.is-prime # LTA␤» The message, however, isn't shown if we use infinity (a Num) for the range: BrokenRobot m: my $x = ^∞.grep: *.is-prime # LTA camelia rakudo-moar d075c8: OUTPUT«Method 'is-prime' not found for invocant of class 'Num'␤ in block <unit> at <tmp> line 1␤␤» Or, it seems, any non-Int: BrokenRobot m: my $x = ^5.5.grep: *.is-prime # LTA camelia rakudo-moar d075c8: OUTPUT«Method 'is-prime' not found for invocant of class 'Rat'␤ in block <unit> at <tmp> line 1␤␤» -- Cheers, ZZ | https://twitter.com/zoffix


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