Check for ESReceiver for contracts with is check

This commit is contained in:
Dmitriy Novozhilov
2020-04-14 12:18:34 +03:00
parent 9b3c3ae4ba
commit ba272101f2
@@ -56,7 +56,7 @@ class Reducer(private val builtIns: KotlinBuiltIns) : ESExpressionVisitor<ESExpr
val result = when (reducedArg) {
is ESConstant -> argType!!.isSubtypeOf(isType)
is ESVariable -> if (argType?.isSubtypeOf(isType) == true) true else null
is ESVariable, is ESReceiver -> if (argType?.isSubtypeOf(isType) == true) true else null
else -> throw IllegalStateException("Unknown ESValue: $reducedArg")
}