From e8c939f40ba5491da1ff9432c11724512351c240 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 23 Sep 2024 20:27:58 +0200 Subject: [PATCH] wasm gc: fix equality checks in records --- .../teavm/classlib/impl/record/ObjectMethodsSubstitutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classlib/src/main/java/org/teavm/classlib/impl/record/ObjectMethodsSubstitutor.java b/classlib/src/main/java/org/teavm/classlib/impl/record/ObjectMethodsSubstitutor.java index b41477a8c..e87b3dc79 100644 --- a/classlib/src/main/java/org/teavm/classlib/impl/record/ObjectMethodsSubstitutor.java +++ b/classlib/src/main/java/org/teavm/classlib/impl/record/ObjectMethodsSubstitutor.java @@ -56,7 +56,7 @@ public class ObjectMethodsSubstitutor implements BootstrapMethodSubstitutor { pe.jump(joint); }); ConditionProducer classCondition = () -> thatVar.isNull() - .or(() -> thatVar.invokeVirtual("getClass", Class.class).isNotSame(pe.constant(type))); + .or(() -> thatVar.invokeSpecial("getClass", Class.class).isNotSame(pe.constant(type))); pe.when(classCondition).thenDo(() -> { pe.constant(0).propagateTo(result); pe.jump(joint);