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
lvalue return broken in signature #16161
Comments
From zefram@fysh.orgCreated by zefram@fysh.orgMixing signatures with lvalue subs: $ perl5.26.0 -Mexperimental=signatures -lwe 'our @a = qw(wibble wobble wabble); sub foo ($i = return substr($a[0], -1, 1)) :lvalue { return substr($a[$i], 1, 1); } print "@a"; foo(2) = "u"; print "@a"; foo() = "y"; print "@a"' Observe that returning a substr() lvalue works fine in the main block of The cause is that the substr op gets a flag set at compile time to $ perl5.20.0 -Mexperimental=signatures -lwe 'our @a = qw(wibble wobble wabble); sub foo :lvalue ($i = return substr($a[0], -1, 1)) { return substr($a[$i], 1, 1); } print "@a"; foo(2) = "u"; print "@a"; foo() = "y"; print "@a"' There are also other ops affected by lvalueness, which will be broken Perl Info
|
@iabyn - Status changed from 'new' to 'resolved' |
From @iabynOn Thu, Sep 21, 2017 at 01:38:17PM -0700, Zefram wrote:
Fixed in 5.27.8. Resolving. -- |
Then the question is "why are they still 'experimental' in 5,30?" Is there anything needed to help with resolution, so that they can become mainstream in 5.32? |
See the current a big discussion on the p5p mailing list entitled "Jumbo Signatures extensions discussion". |
Migrated from rt.perl.org#132141 (status was 'resolved')
Searchable as RT132141$
The text was updated successfully, but these errors were encountered: