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 signatures and "my" vars: "state" variable $y masks earlier declaration #15472
Comments
From @cpansproutThis behaves as expected: $ ./perl -Ilib -we 'my $y if 0; my $y' If I accomplish the same thing inside a subroutine signature, I get the wrong warning: $ ./perl -Ilib -wE 'use experimental "signatures"; sub foo($x=0 && my $y, $y=1) {}' There is no state variable there. I get the same results from 5.20.1 to 5.25.3. -- Father Chrysostomos |
From @cpansproutOn Sat Jul 23 22:38:31 2016, sprout wrote:
The ‘my in false conditional’ is unrelated. I just came across this bug when experimenting with that. $ ./perl -Ilib -wE 'use experimental "signatures"; sub foo($y, $y) {}' -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Sat, Jul 23, 2016 at 10:39:34PM -0700, Father Chrysostomos via RT wrote:
I'll look into fixing this in my sig branch -- |
From @iabynOn Mon, Jul 25, 2016 at 09:08:15AM +0100, Dave Mitchell wrote:
Now fixed by v5.25.3-118-gd79f31b -- |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128719 (status was 'resolved')
Searchable as RT128719$
The text was updated successfully, but these errors were encountered: