Make companion classes public when desugaring default methods for android
RELNOTES: none
@@ -154,7 +154,8 @@ class InterfaceDesugaring extends ClassVisitor {
companion = store.add(companionName);
companion.visit(
bytecodeVersion,
- (accessFlags | Opcodes.ACC_SYNTHETIC) & ~Opcodes.ACC_INTERFACE,
+ // Companion class must be public so moved methods can be called from anywhere
+ (accessFlags | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_PUBLIC) & ~Opcodes.ACC_INTERFACE,
companionName,
(String) null, // signature
"java/lang/Object",
