From bf91ada06c747d62000714bb26ba9812988f2684 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Thu, 10 Sep 2020 16:10:06 +0300 Subject: [PATCH] [NI] Suppress false positive IDEA warnings in NewConstraintSystemImpl --- .../calls/inference/model/NewConstraintSystemImpl.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt index 82fe8c5b12b..fdfd8bf9f42 100644 --- a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt +++ b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt @@ -41,21 +41,29 @@ class NewConstraintSystemImpl( COMPLETION } + /* + * If remove spread operator then call `checkState` will resolve to itself + * instead of fun checkState(vararg allowedState: State) + */ + @Suppress("RemoveRedundantSpreadOperator") private fun checkState(a: State) { if (!AbstractTypeChecker.RUN_SLOW_ASSERTIONS) return checkState(*arrayOf(a)) } + @Suppress("RemoveRedundantSpreadOperator") private fun checkState(a: State, b: State) { if (!AbstractTypeChecker.RUN_SLOW_ASSERTIONS) return checkState(*arrayOf(a, b)) } + @Suppress("RemoveRedundantSpreadOperator") private fun checkState(a: State, b: State, c: State) { if (!AbstractTypeChecker.RUN_SLOW_ASSERTIONS) return checkState(*arrayOf(a, b, c)) } + @Suppress("RemoveRedundantSpreadOperator") private fun checkState(a: State, b: State, c: State, d: State) { if (!AbstractTypeChecker.RUN_SLOW_ASSERTIONS) return checkState(*arrayOf(a, b, c, d))