Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nil-assignment to native types doesn't work #3360

Open
p6rt opened this issue Mar 27, 2014 · 3 comments
Open

Nil-assignment to native types doesn't work #3360

p6rt opened this issue Mar 27, 2014 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Mar 27, 2014

Migrated from rt.perl.org#121518 (status was 'new')

Searchable as RT121518$

@p6rt
Copy link
Author

p6rt commented Mar 27, 2014

From @moritz

<+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

@p6rt
Copy link
Author

p6rt commented Mar 27, 2014

From @moritz

A test exists in S02-types/type.t

@p6rt
Copy link
Author

p6rt commented Mar 31, 2014

From @moritz

The eval line was

r​: my num $alpha = Nil;

On Thu Mar 27 13​:05​:32 2014, moritz wrote​:

<+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

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant