This code:

  class Point {
      has $.x is rw;
      has $.y is rw;

      method get_string () {
          return "<$.x, $.y>";
      }
  }

  my Point $point .= new( :x<1.2>, :y<-3.7> );
  say $point.x;
  say $point;

Generates this output:

  1.2
  get_string() not implemented in class 'Point'
  current instr.: 'print' pc 14726 (src/gen_builtins.pir:9076)
  called from Sub 'say' pc 14748 (src/gen_builtins.pir:9086)
  called from Sub '_block11' pc 152 (EVAL_12:53)
  called from Sub 'parrot;PCT;HLLCompiler;eval' pc 864 
(src/PCT/HLLCompiler.pir:498)
  called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1138 
(src/PCT/HLLCompiler.pir:627)
  called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1317 
(src/PCT/HLLCompiler.pir:716)
  called from Sub 'parrot;Perl6;Compiler;main' pc 17077 (perl6.pir:179)
  *** glibc detected *** double free or corruption (!prev): 0x084eaaf0 ***

This is Parrot 0.8.0.

  $ uname -a
  Linux critix 2.6.8-2-686-smp #1 SMP Tue Aug 16 12:08:30 UTC 2005 i686 
GNU/Linux

Cheers,
Ovid
--
Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://use.perl.org/~Ovid/journal/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Reply via email to