From c8f9b466b674d7952433a13221cbe3a6e15fe212 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Wed, 10 Jun 2015 15:39:13 +0300 Subject: [PATCH] More correct comparison with CANT_INFER_FUNCTION_PARAM_TYPE --- .../tests/functionAsExpression/MissingParameterTypes.txt | 2 +- .../src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.txt b/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.txt index cb07ce62458..ff6f5c28578 100644 --- a/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.txt +++ b/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.txt @@ -1,6 +1,6 @@ package -internal val a: (???) -> [ERROR : Cannot be inferred] +internal val a: (???) -> ??? internal val b: (kotlin.Int) -> kotlin.Int internal val c: (kotlin.Int, kotlin.String) -> kotlin.Int internal val d: (kotlin.Int, kotlin.String) -> kotlin.Int diff --git a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt index 7ea5e76eea6..bd0cc6cdd3a 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt @@ -180,7 +180,7 @@ internal class DescriptorRendererImpl( private fun renderInflexibleType(type: JetType): String { assert(!type.isFlexible()) { "Flexible types not allowed here: " + renderNormalizedType(type) } - if (type identityEquals CANT_INFER_FUNCTION_PARAM_TYPE || TypeUtils.isDontCarePlaceholder(type)) { + if (type == CANT_INFER_FUNCTION_PARAM_TYPE || TypeUtils.isDontCarePlaceholder(type)) { return "???" } if (ErrorUtils.isUninferredParameter(type)) {