From d9ef7d0c8ab9f014f795049f05207be350c9bd03 Mon Sep 17 00:00:00 2001 From: Pavel Kirpichenkov Date: Thu, 5 Dec 2019 20:59:56 +0300 Subject: [PATCH] [NI] Update / mute diagnostics Update diagnostics for new inference. 'Not enough information for parameter' should not be reported for fake calls and functions with error return type, muted in tests. --- .../tests/incompleteCode/controlStructuresErrors.kt | 6 ++++-- .../inference/reportingImprovements/FunctionPlaceholder.kt | 4 ++-- .../tests/inline/nonLocalReturns/lambdaAsGeneric.kt | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt b/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt index c3a8ef074b0..c2d9240da61 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt @@ -1,5 +1,7 @@ +// !WITH_NEW_INFERENCE + fun test1() { - if (rr) { + if (rr) { if (l) { a.q() } @@ -14,7 +16,7 @@ fun test1() { else { a.u() } - } + } } fun test2(l: List<AA>) { diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt index 22d3d719d21..7c8f413b183 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt @@ -11,7 +11,7 @@ fun test() { foo { x -> x} foo { x: Int -> x} - bar { it + 1 } - bar { x -> x + 1} + bar { it + 1 } + bar { x -> x + 1} bar { x: Int -> x + 1} } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsGeneric.kt b/compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsGeneric.kt index 241adc0c88a..5354f13093f 100644 --- a/compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsGeneric.kt +++ b/compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsGeneric.kt @@ -1,5 +1,7 @@ +// !WITH_NEW_INFERENCE + fun box() : String { - test { + test { return@box "123" }