# New Ticket Created by  Paweł Pabian 
# Please include the string:  [perl #131342]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131342 >


I'm not sure what proper behavior should be in this useless code below :)
Probably something like in "say @t[*]" - constructing items until OOM - because 
Inf -1 = Inf.

$ perl6 -e 'my @t := 1 .. *; say @t[*-1]'
Cannot coerce Inf to an Int
  in block <unit> at -e line 1

Actually thrown at:
  in block <unit> at -e line 1


Also using two Whatevers on infinite list gives another cast error.
IMO in this case exception should be thrown because Inf - Inf = NaN.

$ perl6 -e 'my @t := 1 .. *; say @t[*-*]'
Cannot coerce NaN to an Int
  in block <unit> at -e line 1

Actually thrown at:
  in block <unit> at -e l

Reply via email to