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

And-assigning (&&=) True with False doesn't produce False or equiv #715

Closed
p6rt opened this issue Feb 22, 2009 · 4 comments
Closed

And-assigning (&&=) True with False doesn't produce False or equiv #715

p6rt opened this issue Feb 22, 2009 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Feb 22, 2009

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

Searchable as RT63396$

@p6rt
Copy link
Author

p6rt commented Feb 22, 2009

From @masak

<jnthn> rakudo​: my $x = True; $x &&= True; say $x;
<p6eval> rakudo 2a9382​: OUTPUT«1␤»
<jnthn> rakudo​: my $x = True; $x &&= False; say $x;
<p6eval> rakudo 2a9382​: OUTPUT«1␤»
<jnthn> ...erm.
* jnthn summons masak
<masak> ta-daa!
<jnthn> masak​: Hey look rakudobug!
<masak> ooh!
* masak submits

To be clear on what seems wrong here​: the second evaluation should not
evaluate to 1, since True && False is False.

@p6rt
Copy link
Author

p6rt commented Mar 25, 2009

From @jnthn

On Sun Feb 22 08​:07​:39 2009, masak wrote​:

<jnthn> rakudo​: my $x = True; $x &&= True; say $x;
<p6eval> rakudo 2a9382​: OUTPUT«1␤»
<jnthn> rakudo​: my $x = True; $x &&= False; say $x;
<p6eval> rakudo 2a9382​: OUTPUT«1␤»
<jnthn> ...erm.
* jnthn summons masak
<masak> ta-daa!
<jnthn> masak​: Hey look rakudobug!
<masak> ooh!
* masak submits

To be clear on what seems wrong here​: the second evaluation should not
evaluate to 1, since True && False is False.

This works in current, latest Rakudo. Have added a test to assign.t to
make sure we don't regress on it.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Mar 25, 2009

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

@p6rt
Copy link
Author

p6rt commented Mar 25, 2009

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

@p6rt p6rt closed this as completed Mar 25, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant