diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt index 851008c6b2d..50a5599a66f 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt @@ -210,7 +210,8 @@ class KotlinCallCompleter( val constraints = variableWithConstraints.constraints return constraints.isNotEmpty() && constraints.all { !it.type.typeConstructor(context).isIntegerLiteralTypeConstructor(context) && - it.kind.isLower() && csBuilder.isProperType(it.type) + (it.kind.isLower() || it.kind.isEqual()) && + csBuilder.isProperType(it.type) } } diff --git a/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt b/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt index f03833ab722..8e89a8ad7f3 100644 --- a/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt +++ b/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt @@ -19,8 +19,8 @@ fun test(i: Int?) { foo(l4@ "") foo(("")) - foo(checkSubtype("")) - foo(checkSubtype("")) + foo(checkSubtype("")) + foo(checkSubtype("")) use(a, b, c, d) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/propagationOfNoInferAnnotation.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/propagationOfNoInferAnnotation.kt new file mode 100644 index 00000000000..31f95ce131f --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/propagationOfNoInferAnnotation.kt @@ -0,0 +1,10 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") +fun foo(): @kotlin.internal.NoInfer T = TODO() + +fun bar(k: K) {} + +fun test() { + bar(foo()) +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/propagationOfNoInferAnnotation.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/propagationOfNoInferAnnotation.txt new file mode 100644 index 00000000000..91de405288e --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/propagationOfNoInferAnnotation.txt @@ -0,0 +1,5 @@ +package + +public fun bar(/*0*/ k: K): kotlin.Unit +@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun foo(): T +public fun test(): kotlin.Unit