From 4072111af5626d19c940c6b361f1a99f988429f8 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 13 Sep 2024 13:25:26 +0200 Subject: [PATCH] wasm: fix error when generating casts --- .../wasm/generate/common/methods/BaseWasmGenerationVisitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d3c2b626f..620c680fc 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 @@ -1184,7 +1184,7 @@ public abstract class BaseWasmGenerationVisitor implements StatementVisitor, Exp @Override public void visit(CastExpr expr) { - var wasmTargetType = (WasmType.CompositeReference) mapType(expr.getTarget()); + var wasmTargetType = mapType(expr.getTarget()); acceptWithType(expr.getValue(), expr.getTarget()); if (!expr.isWeak()) { result.acceptVisitor(typeInference);