[IR] Unconditionally allow to interpret IrConst

We can interpret all const elements. It wasn't true on early
prototype phase because of some problems with unsigned numbers,
but right now it is correct to assume that all const are valid.

#KT-58923
This commit is contained in:
Ivan Kylchik
2023-05-26 22:37:52 +02:00
committed by Space Team
parent 6f4f06757a
commit e5ed1714d1
@@ -114,10 +114,6 @@ class IrInterpreterCommonChecker : IrInterpreterChecker {
}
override fun visitConst(expression: IrConst<*>, data: IrInterpreterCheckerData): Boolean {
if (expression.type.getUnsignedType() != null) {
val constructor = expression.type.classOrNull?.owner?.constructors?.singleOrNull() ?: return false
return data.mode.canEvaluateFunction(constructor)
}
return true
}