back2dos / tinkerbell

MIT License
83 stars 8 forks source link

@:forward not work in wiki example #39

Closed sonygod closed 11 years ago

sonygod commented 11 years ago

class Stack implements tink.lang.Cls { @:forward(push, pop, iterator, length) var elements:Array; public function new() { this.elements = [];

   }

}

// src/Stack.hx:9: characters 9-16 : Invalid number of type parameters for Array C:\Motion-Twin\haxe\lib\tink_lang/0,4,0/tink/lang/Cls.hx:10: characters 3-12 : Build failure src/Stack.hx:9: characters 46-65 : Invalid number of type parameters for Array src/Stack.hx:11: characters 12-25 : Stack has no field elements

SimonRichardson commented 11 years ago

Is this not as simple as ?

class Stack<T> implements tink.lang.Cls {
@:forward(push, pop, iterator, length) var elements:Array<T>;
public function new() {
this.elements = [];

   }
}
sonygod commented 11 years ago

thank you ,it's work now !

back2dos commented 11 years ago

Thanks for noticing! I updated in the wiki, but feel free to do so yourself ;)