You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, the bytecode of the test() method looks like this (package names removed in all of the following examples)
L0
LINENUMBER 11 L0
NEW Test
DUP
NEW Test
DUP
ACONST_NULL
ACONST_NULL
INVOKESPECIAL Test.<init> (Ljava/lang/String;LTest;)V
INVOKESPECIAL Test.<init> (LTest;)V
ASTORE 0
L1
LINENUMBER 12 L1
RETURN
In this case, Mixin code that attempts to match NEW with a corresponding INVOKESPECIAL fails, and mixin provides seemingly "impossible" error messages.
This to the best of my knowledge doesn't occur anywhere in Minecraft.
Consider the following target:
Then, the bytecode of the test() method looks like this (package names removed in all of the following examples)
In this case, Mixin code that attempts to match
NEW
with a correspondingINVOKESPECIAL
fails, and mixin provides seemingly "impossible" error messages.This redirect:
Produces the following error:
So it seems like it's trying to use the one-argument constructor. But when I target the one argument constructor like this:
Results in this error:
So in this case, it's expecting the 2-argument constructor.
This is caused by the use of this method:
Mixin/src/main/java/org/spongepowered/asm/mixin/injection/struct/Target.java
Lines 641 to 653 in 41a6885
Which assumes that between a
NEW
and its correspondingINVOKESPECIAL
, there cannot be anotherNEW
andINVOKESPECIAL
for the same class.The text was updated successfully, but these errors were encountered: