Extract effect from lambda argument if it is in parentheses
Otherwise, contracts on the parameter have no effect. #KT-42044 Fixed #KT-26229 Fixed
This commit is contained in:
@@ -242,7 +242,10 @@ class EffectsExtractingVisitor(
|
||||
private fun ValueArgument.toComputation(): Computation? {
|
||||
return when (this) {
|
||||
is KtLambdaArgument -> getLambdaExpression()?.let { ESLambda(it) }
|
||||
is KtValueArgument -> getArgumentExpression()?.let { extractOrGetCached(it) }
|
||||
is KtValueArgument -> getArgumentExpression()?.let {
|
||||
if (it is KtLambdaExpression) ESLambda(it)
|
||||
else extractOrGetCached(it)
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user