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.
This commit is contained in:
LlamaLad7 authored and GitHub committed 2024-07-01 08:58:23 +01:00
1 parent d0a6ebdf9e
commit 2edfbc448e
1 file changed
+4
@@ -871,6 +871,10 @@ public class MixinTargetContext extends ClassContext implements IMixinContext {
* @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);
}