@:generic class A { var items:Array; public function new() { items = []; } inline public function get(_index:Int) : T { return items[_index]; } } class Test { var a: A; function new() { } static function main() { trace("Haxe is great!"); a. } }