From 7c5c744e8710718481c1d951f4c3ad24debb6827 Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Tue, 27 Apr 2021 18:25:12 +0300 Subject: [PATCH] FIR: Update test data (suspicious diagnostic on return statement) There should be errors, but different: cannot infer parameter type ^KT-46422 Relates --- .../diagnostics/tests/inference/kt6175.fir.kt | 16 ++++++++-------- .../cannotInferParameterTypeWithInference.fir.kt | 2 +- .../lambdaArgumentWithBoundWithoutType.fir.kt | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/compiler/testData/diagnostics/tests/inference/kt6175.fir.kt b/compiler/testData/diagnostics/tests/inference/kt6175.fir.kt index 75ccd5a614d..ed4b4a4b090 100644 --- a/compiler/testData/diagnostics/tests/inference/kt6175.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/kt6175.fir.kt @@ -5,10 +5,10 @@ fun foo(body: (R?) -> T): T = fail() fun test1() { foo { - true + true } foo { x -> - true + true } } @@ -17,10 +17,10 @@ fun bar(body: (R) -> T): T = fail() fun test2() { bar { - true + true } bar { x -> - true + true } } @@ -28,10 +28,10 @@ fun baz(body: (List) -> T): T = fail() fun test3() { baz { - true + true } baz { x -> - true + true } } @@ -39,10 +39,10 @@ fun brr(body: (List) -> T): T = fail() fun test4() { brr { - true + true } brr { x -> - true + true } } diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.fir.kt index 04f0dd15e3b..80e64e539ee 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.fir.kt @@ -6,7 +6,7 @@ fun foo(block: (T)-> R) = block fun test1() { foo { x -> // here we have 'cannot infer parameter type' error - 43 + 43 } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.fir.kt index 2dbb729062c..ab39cb96649 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.fir.kt @@ -16,11 +16,11 @@ val foo: Foo = run { val foofoo: Foo = run { val x = foo() if (x == null) throw Exception() - x + x } val bar: Bar = run { val x = foo() if (x == null) throw Exception() - x + x }