Skip Menu |
Report information
Id: 121518
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: moritz <moritz.lenz+perl [at] gmail.com>
Cc:
AdminCc:

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



From: Moritz Lenz <moritz [...] faui2k3.org>
Date: Thu, 27 Mar 2014 21:05:01 +0100
To: rakudobug [...] perl.org
Subject: Nil-assignment to native types doesn't work on moar and JVM
Download (untitled) / with headers
text/plain 474b
<+camelia> rakudo-jvm 68e094, rakudo-moar 68e094: OUTPUT«Cannot unbox a type object␤ in block at /tmp/tmpfile:1␤␤» <+camelia> ..rakudo-parrot 68e094: ( no output ) < moritz> p: my num $alpha = Nil; say $alpha.perl <+camelia> rakudo-parrot 68e094: OUTPUT«0e0␤» I think that parrot is correct here; the knowledge that a variable is natively typed (and its return value) is known at compile time, so I see no good reason why this shouldn't work
A test exists in S02-types/type.t
Download (untitled) / with headers
text/plain 582b
The eval line was r: my num $alpha = Nil; On Thu Mar 27 13:05:32 2014, moritz wrote: Show quoted text
> <+camelia> rakudo-jvm 68e094, rakudo-moar 68e094: OUTPUT«Cannot unbox a > type object␤ in block at /tmp/tmpfile:1␤␤» > <+camelia> ..rakudo-parrot 68e094: ( no output ) > < moritz> p: my num $alpha = Nil; say $alpha.perl > <+camelia> rakudo-parrot 68e094: OUTPUT«0e0␤» > > I think that parrot is correct here; the knowledge that a variable is > natively typed (and its return value) is known at compile time, so I see > no good reason why this shouldn't work


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