HaxeFoundation / HaxeFoundation/haxe

[hl] `--dce full` and a call before `super` produce JIT ERROR

Open
#10,323 0 comments 0 reactions 1 assignee Claimed by @ncannasse View on GitHub
bug platform-hl
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

```haxe
class CustomException extends haxe.Exception {

public static function init() {
}

//adding `@:keep` fixes the error
public function new() {
super(fun());
}

// adding `inline` fixes the error
static function fun():String {
return 'hello';
}
}

class Main {
static function main() {
CustomException.init();
}
}
```
```
$ haxe --main Main --hl test.hl --dce full && hl test.hl
JIT ERROR -1 (jit.c line 1495)
```

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.