For 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 $!n = 0; method x ($!n) {} }.new.x: 42'
org.perl6.nqp.sixmodel.reprs.P6OpaqueBaseInstance$BadReferenceRuntimeException: 
Cannot access a native attribute as a reference attribute
  in method x at -e line 1
  in block <unit> at -e line 1

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)'
org.perl6.nqp.sixmodel.reprs.P6OpaqueBaseInstance$BadReferenceRuntimeException: 
Cannot access a native attribute as a reference attribute
  in block <unit> at -e line 1

This works, if one doesn't use a native here: 
https://github.com/rakudo/rakudo/blob/2c681c55520d34750663cdec2fefcf3005ee550e/src/core/Rakudo/Internals.pm#L266

Reply via email to