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

|| with native int returns "1" instead of the int's value #5912

Closed
p6rt opened this issue Dec 25, 2016 · 5 comments
Closed

|| with native int returns "1" instead of the int's value #5912

p6rt opened this issue Dec 25, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 25, 2016

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

Searchable as RT130404$

@p6rt
Copy link
Author

p6rt commented Dec 25, 2016

From @zoffixznet

zoffix@​VirtualBox​:~$ perl6 -e 'my int $x = 4; say $x || 2'
1
zoffix@​VirtualBox​:~$ perl6 --optimize=off -e 'my int $x = 4; say $x || 2'
4
zoffix@​VirtualBox​:~$ perl6 -v
This is Rakudo version 2016.11-182-gea28845 built on MoarVM version 2016.11-41-gd2139b5
implementing Perl 6.c.
zoffix@​VirtualBox​:~$

There's a pretty good chance that the optimizer evaluates the statement and encounters NQP bug involving ||​: Raku/nqp#332

@p6rt
Copy link
Author

p6rt commented Jul 15, 2017

From @dogbert17

On Sun, 25 Dec 2016 09​:50​:17 -0800, cpan@​zoffix.com wrote​:

zoffix@​VirtualBox​:~$ perl6 -e 'my int $x = 4; say $x || 2'
1
zoffix@​VirtualBox​:~$ perl6 --optimize=off -e 'my int $x = 4; say $x ||
2'
4
zoffix@​VirtualBox​:~$ perl6 -v
This is Rakudo version 2016.11-182-gea28845 built on MoarVM version
2016.11-41-gd2139b5
implementing Perl 6.c.
zoffix@​VirtualBox​:~$

There's a pretty good chance that the optimizer evaluates the
statement and encounters NQP bug involving ||​:
Raku/nqp#332

Looks as if Zoffix fixed this with rakudo/rakudo@83e1570

@p6rt
Copy link
Author

p6rt commented Jul 15, 2017

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

@p6rt
Copy link
Author

p6rt commented Jul 15, 2017

From @zoffixznet

Tests in Raku/roast@b1f116f

@p6rt
Copy link
Author

p6rt commented Jul 15, 2017

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

@p6rt p6rt closed this as completed Jul 15, 2017
@p6rt p6rt added the optimizer label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant