[Native] Move hasNonConstInitializer from IrUtils2
This function could be useful for other backends.
This commit is contained in:
@@ -171,6 +171,9 @@ fun IrMemberAccessExpression<*>.addArguments(args: Map<ParameterDescriptor, IrEx
|
||||
}
|
||||
}
|
||||
|
||||
val IrField.hasNonConstInitializer: Boolean
|
||||
get() = initializer?.expression.let { it != null && it !is IrConst<*> && it !is IrConstantValue }
|
||||
|
||||
fun IrExpression.isNullConst() = this is IrConst<*> && this.kind == IrConstKind.Null
|
||||
|
||||
fun IrExpression.isTrueConst() = this is IrConst<*> && this.kind == IrConstKind.Boolean && this.value == true
|
||||
|
||||
Reference in New Issue
Block a user