[haXe] Bug extending double Arrays?

Tapani Utriainen tapani at cs.chalmers.se
Sun Dec 9 08:14:22 CET 2007


Hello all,

I want to create a class that extends a double Array. The problem is that I
cannot access the elements inside the inheriting class without the program
hanging.
Minimal example:

/* --------------------------------------------- */

class IntMatrix extends Array<Array<Int>> {
   public function new(width:Int, height:Int) {
      super();
      this[0] = new Array<Int>();
   }
}

/* --------------------------------------------- */

The program hangs on assignment to this[0].

The actual class is a bit more of course, the constructor should initialize
the array(s) for instance. While it appears (to me!) to be a bug, a more
likely explanation is just me missing something somehow, and would be happy
to learn what =)

I am compiling it to swf (v9/AS3), and executing it with flashplayer 9.

//Tapani





More information about the Haxe mailing list