Fix visibility of protected classes in bytecode
Protected should be translated to public as in Java so that everything would work at runtime. The real visibility is still saved to an InnerClasses attribute #KT-8269 Fixed #KT-9246 Fixed #KT-10143 Fixed
This commit is contained in:
@@ -265,6 +265,7 @@ public class AsmUtil {
|
||||
return getVisibilityAccessFlagForAnonymous(descriptor);
|
||||
}
|
||||
if (descriptor.getVisibility() == Visibilities.PUBLIC ||
|
||||
descriptor.getVisibility() == Visibilities.PROTECTED ||
|
||||
// TODO: should be package private, but for now Kotlin's reflection can't access members of such classes
|
||||
descriptor.getVisibility() == Visibilities.LOCAL ||
|
||||
descriptor.getVisibility() == Visibilities.INTERNAL) {
|
||||
|
||||
Reference in New Issue
Block a user