Fix companion field access from inline class

#KT-26858
This commit is contained in:
Dmitry Petrov
2018-09-21 14:55:19 +03:00
parent 3e4d8eba76
commit 1869ed09bc
7 changed files with 104 additions and 2 deletions
@@ -197,8 +197,8 @@ public class JvmCodegenUtil {
if (KotlinTypeMapper.isAccessor(property)) return false;
CodegenContext context = contextBeforeInline.getFirstCrossInlineOrNonInlineContext();
// Inline functions or inline classes can't use direct access because a field may not be visible at the call site
if (context.isInlineMethodContext() || (context.getEnclosingClass() != null && context.getEnclosingClass().isInline())) {
// Inline functions can't use direct access because a field may not be visible at the call site
if (context.isInlineMethodContext()) {
return false;
}