diff --git a/core/src/main/java/org/teavm/backend/wasm/generate/common/methods/BaseWasmGenerationVisitor.java b/core/src/main/java/org/teavm/backend/wasm/generate/common/methods/BaseWasmGenerationVisitor.java index e1236af8e..4c3f94b0b 100644 --- a/core/src/main/java/org/teavm/backend/wasm/generate/common/methods/BaseWasmGenerationVisitor.java +++ b/core/src/main/java/org/teavm/backend/wasm/generate/common/methods/BaseWasmGenerationVisitor.java @@ -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);