HaxeFoundation / HaxeFoundation/haxe

[jvm] Wrong bytecode generated for varargs constructor?

Open
#10,380 4 comments 1 reaction 1 assignee Claimed by @Simn View on GitHub
platform-jvm
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

With this extern class: https://www.keycloak.org/docs-api/15.0/javadocs/org/keycloak/component/ComponentValidationException.html

```haxe
static function main()
trace(new ComponentValidationException('foo'));
```

At runtime:
```
Exception in thread "main" java.lang.NoSuchMethodError: org.keycloak.component.ComponentValidationException: method 'void (java.lang.String)' not found
```

So apparently the compiler generated a call as if the constructor is:
`ComponentValidationException(String message)`
but it actually is:
`ComponentValidationException(String message, Object... parameters) `

Repro case here:
https://github.com/kevinresol/haxe_issues/tree/issue_10380

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.