By the way, same LTA error is shown for Rat, Complex and possibly some other types.
On Tue, Dec 22, 2015 at 5:04 PM, perl6 via RT <perl6-bugs-follo...@perl.org> wrote: > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "Inf in Int, LTA error message, Inf.Range (-Inf..Inf vs > -Inf^..^Inf)", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [perl #126990]. > > Please include the string: > > [perl #126990] > > in the subject line of all future correspondence about this issue. To do > so, > you may reply to this message. > > Thank you, > perl6-bugs-follo...@perl.org > > ------------------------------------------------------------------------- > Let's start with this: > > Code: > my Int $x = Inf > > Result: > ===SORRY!=== > Cannot find method 'value' > > LTA for sure (meaningless description, no line number). > > 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 > >