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);
|
var call = new WasmCall(function);
|
||||||
call.getArguments().add(new WasmGetLocal(tmp));
|
call.getArguments().add(new WasmGetLocal(tmp));
|
||||||
var arguments = expr.getArguments();
|
var arguments = expr.getArguments();
|
||||||
acceptWithType(arguments.get(0), ValueType.object(expr.getMethod().getClassName()));
|
for (int i = 0; i < arguments.size(); i++) {
|
||||||
call.getArguments().add(result);
|
|
||||||
for (int i = 1; i < arguments.size(); i++) {
|
|
||||||
var argument = arguments.get(i);
|
var argument = arguments.get(i);
|
||||||
acceptWithType(argument, expr.getMethod().parameterType(i));
|
acceptWithType(argument, expr.getMethod().parameterType(i));
|
||||||
call.getArguments().add(result);
|
call.getArguments().add(result);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user