hxjava
hxjava copied to clipboard
Rest from Array doesn't work properly
When creating an Array and populating it with push(), the Rest from it doesn't work correct - it adds null value at the end. The bug in --java and --jvm:
import haxe.Rest;
class Main {
static public function main() {
var a:Array<Any> = new Array<Any>();
a.push(1);
a.push(2);
a.push(3);
trace(a, a.length); // [1,2,3], 3
var r = Rest.of(a);
trace(r, r.length); // [1,2,3,null], 4
}
}
-cp src
-main Main
--each
--java bin/java
--next
--jvm bin/jvm/main.jar
--next
--interp