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

A variable has the wrong value in a statment-modifier for look in Rakudo #2532

Closed
p6rt opened this issue Nov 1, 2011 · 5 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Nov 1, 2011

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

Searchable as RT102650$

@p6rt
Copy link
Author

p6rt commented Nov 1, 2011

From @masak

<grondilu> perl6​: my $foo; sub test { my $bar = $foo++; say $bar and
test for $bar ?? () !! ^2 }; test();
<p6eval> niecza v11​: OUTPUT«Any()␤Any()␤»
<p6eval> ..pugs b927740​: OUTPUT«0␤0␤»
<p6eval> ..rakudo 878004​: OUTPUT«0␤1␤»
<moritz> what would you expect?
<grondilu> 0 0
<moritz> right, if $bar is 1, then the for-loop shouldn't run
<moritz> so, rakudobug
<grondilu> the verbose explanation, and how this is related to the
sudoku algorithm​: http://pastebin.com/7bnjmjAu
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @diakopter

On Tue Nov 01 01​:54​:30 2011, masak wrote​:

<grondilu> perl6​: my $foo; sub test { my $bar = $foo++; say $bar and
test for $bar ?? () !! ^2 }; test();
<p6eval> niecza v11​: OUTPUT«Any()␤Any()␤»
<p6eval> ..pugs b927740​: OUTPUT«0␤0␤»
<p6eval> ..rakudo 878004​: OUTPUT«0␤1␤»
<moritz> what would you expect?
<grondilu> 0 0
<moritz> right, if $bar is 1, then the for-loop shouldn't run
<moritz> so, rakudobug
<grondilu> the verbose explanation, and how this is related to the
sudoku algorithm​: http://pastebin.com/7bnjmjAu
* masak submits rakudobug

fixed. marking testneeded.

18​:40 <diakopter> r​: my $foo; sub test { my $bar = $foo++; say $bar and
test for $bar ?? ()
  !! ^2 }; test();
18​:40 <p6eval> rakudo 024843​: OUTPUT«0␤0␤»

@p6rt
Copy link
Author

p6rt commented May 29, 2012

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

@p6rt
Copy link
Author

p6rt commented Jan 12, 2013

From @moritz

Tested in S04-declarations/my.t

@p6rt
Copy link
Author

p6rt commented Jan 12, 2013

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

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