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);