[IR] Moved isLambda to common IR utils

This commit is contained in:
Igor Chevdar
2020-08-22 11:08:20 +05:00
parent b050ef9970
commit 12ddd137bc
7 changed files with 5 additions and 7 deletions
@@ -537,6 +537,9 @@ fun IrExpression.isSafeToUseWithoutCopying() =
this is IrConst<*> ||
this is IrGetValue && symbol.isBound && symbol.owner.isImmutable
val IrStatementOrigin?.isLambda: Boolean
get() = this == IrStatementOrigin.LAMBDA || this == IrStatementOrigin.ANONYMOUS_FUNCTION
val IrFunction.originalFunction: IrFunction
get() = (this as? IrAttributeContainer)?.attributeOwnerId as? IrFunction ?: this