mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
wasm: fix generation of constructor invocation
This commit is contained in:
parent
7ba0a7fe7d
commit
8e483245f5
|
@ -878,9 +878,7 @@ public abstract class BaseWasmGenerationVisitor implements StatementVisitor, Exp
|
|||
var call = new WasmCall(function);
|
||||
call.getArguments().add(new WasmGetLocal(tmp));
|
||||
var arguments = expr.getArguments();
|
||||
acceptWithType(arguments.get(0), ValueType.object(expr.getMethod().getClassName()));
|
||||
call.getArguments().add(result);
|
||||
for (int i = 1; i < arguments.size(); i++) {
|
||||
for (int i = 0; i < arguments.size(); i++) {
|
||||
var argument = arguments.get(i);
|
||||
acceptWithType(argument, expr.getMethod().parameterType(i));
|
||||
call.getArguments().add(result);
|
||||
|
|
Loading…
Reference in New Issue
Block a user