You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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»
Migrated from rt.perl.org#128602 (status was 'new')
Searchable as RT128602$
The text was updated successfully, but these errors were encountered: