From ba272101f2995b4a890eb037776df52bc5e8f1f3 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 14 Apr 2020 12:18:34 +0300 Subject: [PATCH] Check for ESReceiver for contracts with `is` check --- .../org/jetbrains/kotlin/contracts/model/visitors/Reducer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/contracts/model/visitors/Reducer.kt b/compiler/resolution/src/org/jetbrains/kotlin/contracts/model/visitors/Reducer.kt index 1b26a3af027..621dfa167b4 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/contracts/model/visitors/Reducer.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/contracts/model/visitors/Reducer.kt @@ -56,7 +56,7 @@ class Reducer(private val builtIns: KotlinBuiltIns) : ESExpressionVisitor 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") }