mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-21 04:32:33 +00:00
Improvement: Only check for final method overrides if debug.verify is enabled.
The verifier will catch this anyway, this just gives us a better error which blames the particular mixin, but it's very expensive to check so best avoided in the default case.
This commit is contained in:
1 parent
b0be3b2550
commit
10af73058a
1 file changed
+1
-1
@@ -544,7 +544,7 @@ public class MixinTargetContext extends ClassContext implements IMixinContext {
|
||||
}
|
||||
}
|
||||
|
||||
if (Bytecode.isVirtual(method)) {
|
||||
if (this.getEnvironment().getOption(Option.DEBUG_VERIFY) && Bytecode.isVirtual(method)) {
|
||||
Method superMethod = this.targetClassInfo.findMethodInHierarchy(method, SearchType.SUPER_CLASSES_ONLY, Traversal.ALL, 0);
|
||||
if (superMethod != null && superMethod.isFinal()) {
|
||||
throw new InvalidMixinException(this.mixin, String.format("%s%s in %s overrides a final method from %s",
|
||||
|
||||
Reference in new issue
Block a user