Support private package properties in inline functions
This commit is contained in:
@@ -171,7 +171,10 @@ public class JvmCodegenUtil {
|
||||
if (JetTypeMapper.isAccessor(property)) return false;
|
||||
|
||||
// Inline functions can't use direct access because a field may not be visible at the call site
|
||||
if (context.isInlineFunction() && !Visibilities.isPrivate(property.getVisibility())) return false;
|
||||
if (context.isInlineFunction() &&
|
||||
(!Visibilities.isPrivate(property.getVisibility()) || DescriptorUtils.isTopLevelDeclaration(property))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only properties of the same class can be directly accessed, except when we are evaluating expressions in the debugger
|
||||
if (!isCallInsideSameClassAsDeclared(property, context) && !isDebuggerContext(context)) return false;
|
||||
|
||||
Reference in New Issue
Block a user