Fix couldUseDirectAccessToProperty for private top-level properties
This commit is contained in:
committed by
Max Kammerer
parent
e2eddac27d
commit
8641dbf42a
@@ -140,8 +140,7 @@ public class JvmCodegenUtil {
|
|||||||
if (JetTypeMapper.isAccessor(property)) return false;
|
if (JetTypeMapper.isAccessor(property)) return false;
|
||||||
|
|
||||||
// Inline functions can't use direct access because a field may not be visible at the call site
|
// Inline functions can't use direct access because a field may not be visible at the call site
|
||||||
if (context.isInlineFunction() &&
|
if (context.isInlineFunction() && !Visibilities.isPrivate(property.getVisibility())) {
|
||||||
(!Visibilities.isPrivate(property.getVisibility()) || DescriptorUtils.isTopLevelDeclaration(property))) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user