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

Can't assign to a variable that already contains a Whatever in Rakudo #2256

Closed
p6rt opened this issue Nov 13, 2010 · 5 comments
Closed

Can't assign to a variable that already contains a Whatever in Rakudo #2256

p6rt opened this issue Nov 13, 2010 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 13, 2010

Migrated from rt.perl.org#79166 (status was 'resolved')

Searchable as RT79166$

@p6rt
Copy link
Author

p6rt commented Nov 13, 2010

From @masak

<masak> rakudo​: my $a = *; $a = "foo"; say $a
<p6eval> rakudo c548b8​: OUTPUT«Whatever()<0x7d4de48>␤»
* masak submits rakudobug

jnthn points out that this is how C<($x, *, $y) = 1, 2, 3> works, and
that he's not even sure the above is wrong. I'm convinced that it's
wrong, and if the spec says it isn't, the spec is wrong too. It must
be possible to assign to variables containing a Whatever value.

@p6rt
Copy link
Author

p6rt commented Dec 23, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in S02-builtin_data_types/whatever.t

commit 84eeb91eda9ada8213f062282f85e04779764a5b
Author​: Kyle Hasselbacher <kyleha@​gmail.com>
Date​: Thu Dec 23 14​:00​:16 2010 -0600

  [whatever.t] Test for RT 79166

Inline Patch
diff --git a/S02-builtin_data_types/whatever.t b/S02-builtin_data_types/whatever.t
index 4e1a45e..5ebdc31 100644
--- a/S02-builtin_data_types/whatever.t
+++ b/S02-builtin_data_types/whatever.t
@@ -1,7 +1,7 @@
 use v6;
 use Test;
 
-plan 71;
+plan 73;
 
 # L<S02/Built-In Data Types/"The * character as a standalone term captures the notion of">
 # L<S02/Native types/"If any native type is explicitly initialized to">
@@ -223,6 +223,15 @@ eval_lives_ok '{*.{}}()', '{*.{}}() lives';
     dies_ok { &infix:<R+>(*, 42) }, '&infix:<+>(*, 42) doesn\'t make a closure';
 }
 
+# RT 79166
+{
+    my $rt79166 = *;
+    isa_ok $rt79166, Whatever, 'assignment of whatever still works';
+    $rt79166 = 'RT 79166';
+    #?rakudo todo 'RT 79166'
+    is $rt79166, 'RT 79166', 'assignment to variable with whatever in it';
+}
+
 done_testing;
 
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Dec 23, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 18, 2011

From @moritz

Fixed in nom, test passes now.

@p6rt
Copy link
Author

p6rt commented Sep 18, 2011

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Sep 18, 2011
@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