[FIR2IR] Fix interpreting constants from const properties from other module
This commit is contained in:
committed by
TeamCityServer
parent
a7e6667648
commit
245bc7c8e2
+5
-2
@@ -76,7 +76,10 @@ class IrCompileTimeChecker(
|
||||
override fun visitElement(element: IrElement, data: Nothing?) = false
|
||||
|
||||
private fun visitStatements(statements: List<IrStatement>, data: Nothing?): Boolean {
|
||||
if (mode == EvaluationMode.ONLY_BUILTINS) return false
|
||||
if (mode == EvaluationMode.ONLY_BUILTINS) {
|
||||
val statement = statements.singleOrNull() ?: return false
|
||||
return statement is IrConst<*>
|
||||
}
|
||||
return statements.all { it.accept(this, data) }
|
||||
}
|
||||
|
||||
@@ -263,4 +266,4 @@ class IrCompileTimeChecker(
|
||||
override fun visitThrow(expression: IrThrow, data: Nothing?): Boolean {
|
||||
return expression.value.accept(this, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user