Permit synthetic non-public methods in interface mixins, fixes #148

This commit is contained in:
Mumfrey committed 2016-11-14 13:53:11 +00:00
1 parent c265db7c3e
commit 5a47b53b24
1 file changed
+2 -2
@@ -56,8 +56,8 @@ class MixinPreProcessorInterface extends MixinPreProcessorStandard {
*/
@Override
protected void prepareMethod(MixinMethodNode mixinMethod, Method method) {
// I have no idea how the hell you'd compile this, but we make sure anyway!
if (!ASMHelper.hasFlag(mixinMethod, Opcodes.ACC_PUBLIC)) {
// Userland interfaces should not have non-public methods except for lambda bodies
if (!ASMHelper.hasFlag(mixinMethod, Opcodes.ACC_PUBLIC) && !ASMHelper.hasFlag(mixinMethod, Opcodes.ACC_SYNTHETIC)) {
throw new InvalidInterfaceMixinException(this.mixin, "Interface mixin contains a non-public method! Found " + method + " in "
+ this.mixin);
}