HaxeFoundation / HaxeFoundation/hxjava

Rest from Array doesn't work properly

Open
#40 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Haxe
Stars
46
Forks
14
PR merge metrics
No merged PRs in 30d

Description

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:

```Haxe
import haxe.Rest;

class Main {
static public function main() {
var a:Array = new Array();
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
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.