[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
|
||||
|
||||
-3
@@ -31,6 +31,3 @@ fun IrBuilderWithScope.irCatch() =
|
||||
isLateinit = false
|
||||
)
|
||||
)
|
||||
|
||||
val IrField.hasNonConstInitializer: Boolean
|
||||
get() = initializer?.expression.let { it != null && it !is IrConst<*> && it !is IrConstantValue }
|
||||
|
||||
Reference in New Issue
Block a user