Add missing type access expression for static field accesses

This commit is contained in:
Tamas Vajk
2022-04-14 15:20:54 +02:00
committed by Ian Lynagh
parent 246f228a3b
commit 1e529b2563
2 changed files with 6 additions and 3 deletions

View File

@@ -2486,9 +2486,9 @@ open class KotlinFileExtractor(
val receiver = e.receiver
if (receiver != null) {
extractExpressionExpr(receiver, callable, id, -1, exprParent.enclosingStmt)
} else if (owner.isStatic) {
extractTypeAccessRecursive(owner.parentAsClass.toRawType(), locId, id, -1, callable, exprParent.enclosingStmt)
}
// todo: do we need to extract a type access expression for static fields?
}
is IrGetEnumValue -> {
val exprParent = parent.expr(e, callable)
@@ -2575,6 +2575,8 @@ open class KotlinFileExtractor(
val receiver = e.receiver
if (receiver != null) {
extractExpressionExpr(receiver, callable, lhsId, -1, exprParent.enclosingStmt)
} else if (realField.isStatic) {
extractTypeAccessRecursive(realField.parentAsClass.toRawType(), lhsLocId, lhsId, -1, callable, exprParent.enclosingStmt)
}
}
else -> {