Just speculating, but I think this can be fixed by codegen; to be specific,
the inc_i op should be followed by a truncate in case of a sized variable.

2016-01-04 11:37 GMT+01:00 Elizabeth Mattijsen <l...@dijkmat.nl>:

> > On 04 Jan 2016, at 00:25, Juerd Waalboer (via RT) <
> perl6-bugs-follo...@perl.org> wrote:
> >
> > # New Ticket Created by  Juerd Waalboer
> > # Please include the string:  [perl #127144]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org/Ticket/Display.html?id=127144 >
> >
> >
> > Bug:
> >
> >> my uint8 $x = 255; print $x, " -> "; $x = $x + 1; say $x;
> >    255 -> 0
> >
> > Work as expected:
> >
> >> my uint8 $x = 256; say $x
> >    0
> >> my uint8 $x = 255; print $x, " -> "; $x = $x + 1; say $x;
> >    255 -> 0
> >> my int8 $x = 127; print $x, " -> "; $x++; say $x;
> >    127 -> -128
> >
> > I'd like to contribute tests for this; where in roast should I put them?
> > Please suggest a filename :-)
>
> t/spec/S02-types/native.t probably.
>
>
>
>
> Liz

Reply via email to