typedef Foo = { x: Int, ? y: String,}
class Test { static var a = [{x:1}, {x:2}]; static function test1(): Array<Foo> { $type(a); // Test.hx:10: characters 14-15 : Warning : Array<{ x : Int }> return a; } static function test2(): Array<Foo> { var b = new Array<{x: Int}>(); $type(b); // Test.hx:16: characters 14-15 : Warning : Array<{ x : Int }> b = a; return b; // Haxe complains here. } static function main() { trace("Haxe is great!"); var aa = test1(); trace(aa); var bb = test2(); trace(bb); }}
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.