From 2edfbc448e0ca43c8ba223381395adaa90b90d01 Mon Sep 17 00:00:00 2001 From: LlamaLad7 Date: Mon, 1 Jul 2024 08:58:23 +0100 Subject: [PATCH] Fix: Do not re-parent calls to interface super methods. (#150) The existing logic is wrong, and they will always be valid as-is because any superinterfaces will be merged onto the target class. --- .../asm/mixin/transformer/MixinTargetContext.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/spongepowered/asm/mixin/transformer/MixinTargetContext.java b/src/main/java/org/spongepowered/asm/mixin/transformer/MixinTargetContext.java index f1006b1f4..996621fdf 100644 --- a/src/main/java/org/spongepowered/asm/mixin/transformer/MixinTargetContext.java +++ b/src/main/java/org/spongepowered/asm/mixin/transformer/MixinTargetContext.java @@ -871,6 +871,10 @@ private void processImaginarySuper(MethodNode method, FieldInsnNode fieldInsn) { * @param methodRef Unbound reference to the method */ private void updateStaticBinding(MethodNode method, MemberRef methodRef) { + if (!methodRef.getOwner().equals(this.classNode.superName)) { + // Must be to an interface, no need to re-parent. + return; + } this.updateBinding(method, methodRef, Traversal.SUPER); }