> On 22 Dec 2015, at 16:04, Alex Jakimenko (via RT) > <perl6-bugs-follo...@perl.org> wrote: > > # New Ticket Created by Alex Jakimenko > # Please include the string: [perl #126990] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=126990 > > > > Let's start with this: > > Code: > my Int $x = Inf > > Result: > ===SORRY!=== > Cannot find method ‘value' > LTA for sure (meaningless description, no line number).
Fixed with af87982 , tests are still needed. This is a dupe of RT #127207 . > According to S02 (https://design.perl6.org/S02.html#Immutable_types) it > should be possible to store Inf and NaN in Int. > > This, however, is not what we have right now. > > In other words, there are three (maybe more?) ways to improve this: > 1) Make it possible to store Inf in Int (therefore the error will go away) > 2) Make it throw NYI warning now, perhaps implement it later > 3) Decide that Inf is not compatible with Int, fix the docs and make it > throw a meaningful warning. > > > However, there is another issue that is closely related to this. > > Code: > say Int.Range > > Result: > -Inf..Inf > > Whether this answer is correct or not depends on the decision above: > 1) If it is possible to put Inf into Int variable, then it is correct. > 2) If it will be possible later, then… um… I don't know. Perhaps it is a > good idea to correct it now and then revert it later. > 3) Just fix it! It should be -Inf^..^Inf (at least that's what would make > it clear that you cannot use Inf as Int) > > IRC log: http://irclog.perlgeek.de/perl6/2015-12-22#i_11757210 Fixed with b69aa55c , making Int.Range show -Inf^..^Inf . I think this also still needs tests. Liz