This now gives a segfault on Moar and Parrot and an internal error on JVM:

debian7$ perl6-m --version  # same rakudo version for perl6-p and perl6-j
This is perl6 version 2015.01-6-g25da7a9 built on MoarVM version 
2015.01-5-ga29eaa9

debian7$ perl6-m -e 'class A {}; class B is A { has $!x = 5; our method foo(A:) 
{ say $!x } }; &B::foo(A.new)'
Segmentation fault

debian7$ perl6-p -e 'class A {}; class B is A { has $!x = 5; our method foo(A:) 
{ say $!x } }; &B::foo(A.new)'
Segmentation fault

debian7$ perl6-j -e 'class A {}; class B is A { has $!x = 5; our method foo(A:) 
{ say $!x } }; &B::foo(A.new)'
P6opaque representation does not support attributes
  in method foo at -e:1
  in block <unit> at -e:1

The segfault seems to happen while saying $!x -- if I remove that the code runs 
fine:

debian7$ perl6-m -e 'class A {}; class B is A { has $!x = 5; our method foo(A:) 
{ say "alive" } }; &B::foo(A.new)' 
alive

The above happens on Debian 7 (64 bit).

Interestingly on FreeBSD 10.1 (64 bit) there is no segfault with Parrot (Moar 
and JVM behave as on Debian):

freebsd10.1$ perl6-p -e 'class A {}; class B is A { has $!x = 5; our method 
foo(A:) { say $!x } }; &B::foo(A.new)'
No such method 'gist' for invocant of type 'NQPMu'
  in sub say at gen/parrot/CORE.setting:16823
  in sub say at gen/parrot/CORE.setting:16815
  in method foo at -e:1
  in block <unit> at -e:1

freebsd10.1$ perl6-p --version
This is perl6 version 2015.01-7-gf120204 built on parrot 7.0.1 revision 
RELEASE_7_0_1

The Rakudo version is a few commits newer than in the first examples, but I 
don't think that is relevant, since on Debian even the latest Rakudo on Parrot 
segfaults:

debian7$ perl6-p -e 'class A {}; class B is A { has $!x = 5; our method foo(A:) 
{ say $!x } }; &B::foo(A.new)'
Segmentation fault

debian7$ perl6-p --version
This is perl6 version 2015.01-10-g5dd603b built on parrot 7.0.1 revision 
RELEASE_7_0_1

Reply via email to