Skip Menu |
Report information
Id: 127210
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: juerd [at] tnx.nl
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: uint behaves like signed int in CUnion
To: rakudobug [...] perl.org
Date: Fri, 8 Jan 2016 03:20:10 +0100
From: "Juerd Waalboer" <juerd [...] tnx.nl>
Download (untitled) / with headers
text/plain 575b
Got: Show quoted text
> my $c = Overlap.new(u32 => 1234567);
Overlap.new(u32 => 1234567, u16 => -10617, u8 => -121) Expected: Overlap.new(u32 => 1234567, u16 => 54919, u8 => 135); Tests: class Overlap is repr('CUnion') { has uint32 $.u32; has uint16 $.u16; has uint8 $.u8; } my $overlap = Overlap.new(u32 => 1234567); is $overlap.u16, 54919, "uint16 in union is unsigned"; is $overlap.u8, 135, "uint8 in union is unsigned"; -- Met vriendelijke groet, // Kind regards, // Korajn salutojn, Juerd Waalboer <juerd@tnx.nl> TNX
Date: Fri, 8 Jan 2016 23:34:48 +0100
Subject: Re: [perl #127210] uint behaves like signed int in CUnion
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
To: "Juerd Waalboer (via RT)" <perl6-bugs-followup [...] perl.org>
Download (untitled) / with headers
text/plain 846b
Show quoted text
> On 08 Jan 2016, at 03:20, Juerd Waalboer (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Juerd Waalboer > # Please include the string: [perl #127210] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=127210 > > > > Got: >
>> my $c = Overlap.new(u32 => 1234567);
> Overlap.new(u32 => 1234567, u16 => -10617, u8 => -121) > > Expected: > > Overlap.new(u32 => 1234567, u16 => 54919, u8 => 135); > > Tests: > > class Overlap is repr('CUnion') { > has uint32 $.u32; > has uint16 $.u16; > has uint8 $.u8; > } > my $overlap = Overlap.new(u32 => 1234567); > is $overlap.u16, 54919, "uint16 in union is unsigned"; > is $overlap.u8, 135, "uint8 in union is unsigned";
Added tests with d8cf465


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org