mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-18 10:19:15 +00:00
Move staticness check for mixin field after unique check, closes #576
This commit is contained in:
1 parent
480bd3d9e5
commit
d2d1fbc6f4
1 file changed
+5
-5
+5
-5
@@ -633,11 +633,6 @@ class MixinPreProcessorStandard {
|
||||
mixinField.name = field.renameTo(target.name);
|
||||
}
|
||||
|
||||
if (!Bytecode.compareFlags(mixinField, target, Opcodes.ACC_STATIC)) {
|
||||
throw new InvalidMixinException(this.mixin, String.format("STATIC modifier of @Shadow field %s in %s does not match the target",
|
||||
mixinField.name, this.mixin));
|
||||
}
|
||||
|
||||
if (field.isUnique()) {
|
||||
if ((mixinField.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED)) != 0) {
|
||||
String uniqueName = context.getUniqueName(mixinField);
|
||||
@@ -659,6 +654,11 @@ class MixinPreProcessorStandard {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Bytecode.compareFlags(mixinField, target, Opcodes.ACC_STATIC)) {
|
||||
throw new InvalidMixinException(this.mixin, String.format("STATIC modifier of @Shadow field %s in %s does not match the target",
|
||||
mixinField.name, this.mixin));
|
||||
}
|
||||
|
||||
// Check that the shadow field has a matching descriptor
|
||||
if (!target.desc.equals(mixinField.desc)) {
|
||||
throw new InvalidMixinException(this.mixin, String.format("The field %s in the target class has a conflicting signature",
|
||||
|
||||
Reference in new issue
Block a user