HaxeFoundation / HaxeFoundation/haxe

[JVM] Operand stack underflow

Open
#9,264 9 comments 0 reactions 0 assignees View on GitHub
platform-jvm test-needed
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

I have latest Haxe build on Windows and Linux, plus Java (openjdk 11 on Linux) and hxJava as well.
Following code

```haxe
@:multiType
abstract Zero(Null) {
public function new();

@:to public static inline function toFloat(v:Float):Float return 0;
}

class Main {
public static function main() {
var z:Zero = null;
trace(z);
}
}
```

produces

```
Error: Unable to initialize main class haxe.root.Main
Caused by: java.lang.VerifyError: Operand stack underflow
Exception Details:
Location:
haxe/root/Main.main()V @1: dstore_0
Reason:
Attempt to pop empty stack.
Current Frame:
bci: @1
flags: { }
locals: { }
stack: { null }
Bytecode:
0000000: 0147 b200 1326 b800 19bb 001b 5912 1d12
0000010: 1f10 1312 20b7 0024 b600 2ab1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.