-
Notifications
You must be signed in to change notification settings - Fork 1
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
Can't assign to int
private attribute using signature
#5674
Comments
From @zoffixznet#Doesn't work: # But does, if we use a temp var: |
From @lizmatThis is a known issue, as there is no native support for attribute binding this way. There’s quite some code in the setting working around this issue :-(
|
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Thu Sep 15 11:49:35 2016, cpan@zoffix.com wrote:
I've fixed this and added tests to S12-methods/attribute-params.t. It works for named parameters too. So in terms of the originally reported issue this ticket could be considered done. But. Unfortunately, the moment you have a role instead of a class, or a a more complex signature (for example, involving an unpack), it fails. So, some more work and tests needed. |
From @usev6For the records: This fails on JVM (has to be fixed in src/vm/jvm/runtime/org/perl6/rakudo/Binder.java, probabaly): $ ./perl6-j -e 'class { has int Tests that use the new method SeqNextNFromIterator fail due to this problem. From S32-list/head.t: $ ./perl6-j -e 'my $list = <a b b c>; say $list.head(3)' This works, if one doesn't use a native here: https://github.com/rakudo/rakudo/blob/2c681c55520d34750663cdec2fefcf3005ee550e/src/core/Rakudo/Internals.pm#L266 |
1 similar comment
From @usev6For the records: This fails on JVM (has to be fixed in src/vm/jvm/runtime/org/perl6/rakudo/Binder.java, probabaly): $ ./perl6-j -e 'class { has int Tests that use the new method SeqNextNFromIterator fail due to this problem. From S32-list/head.t: $ ./perl6-j -e 'my $list = <a b b c>; say $list.head(3)' This works, if one doesn't use a native here: https://github.com/rakudo/rakudo/blob/2c681c55520d34750663cdec2fefcf3005ee550e/src/core/Rakudo/Internals.pm#L266 |
From @usev6On Sat Oct 15 00:31:09 2016, bartolin@gmx.de wrote:
Again, for the records: lizmat++ put in a bandaid for rakudo-j with Rakudo commit 666128fc6e. The tests from S32-list/head.t run fine, but the underlying problem is still there. |
From @usev6On Tue, 18 Oct 2016 08:39:21 -0700, bartolin@gmx.de wrote:
The bandaid was remove recently (Rakudo commit e8f938b0f6) after psch++ implemented attribute parameter binding on the JVM. So we are back to what jnthn said about roles or more complex signatures: On Wed, 21 Sep 2016 06:30:00 -0700, jnthn@jnthn.net wrote:
|
Migrated from rt.perl.org#129278 (status was 'open')
Searchable as RT129278$
The text was updated successfully, but these errors were encountered: