From 4b823eca21a0d2ec29f3c86a69742ce5bcab981e Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 28 Jan 2021 13:58:12 +0300 Subject: [PATCH] Fix test data (FIR_IDENTICAL) --- .../suspendFunInterfaceConversion.fir.kt | 14 ------------- .../suspendFunInterfaceConversion.kt | 1 + ...uspendConversionForSimpleExpression.fir.kt | 14 ------------- ...FunSuspendConversionForSimpleExpression.kt | 1 + .../suspendConversionWithFunInterfaces.fir.kt | 21 ------------------- .../suspendConversionWithFunInterfaces.kt | 1 + 6 files changed, 3 insertions(+), 49 deletions(-) delete mode 100644 compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/suspendConversion/suspendConversionWithFunInterfaces.fir.kt diff --git a/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.fir.kt b/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.fir.kt deleted file mode 100644 index 8c60a7b0cfd..00000000000 --- a/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.fir.kt +++ /dev/null @@ -1,14 +0,0 @@ -// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionalInterfaceConversion -// !DIAGNOSTICS: -UNUSED_PARAMETER -NOTHING_TO_INLINE - -fun interface SuspendRunnable { - suspend fun invoke() -} - -fun run(r: SuspendRunnable) {} - -suspend fun bar() {} - -fun test() { - run(::bar) -} diff --git a/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.kt b/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.kt index 8c60a7b0cfd..0e82d898a1f 100644 --- a/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.kt +++ b/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionalInterfaceConversion // !DIAGNOSTICS: -UNUSED_PARAMETER -NOTHING_TO_INLINE diff --git a/compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.fir.kt b/compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.fir.kt deleted file mode 100644 index aaf124a2478..00000000000 --- a/compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.fir.kt +++ /dev/null @@ -1,14 +0,0 @@ -// !LANGUAGE: +SuspendConversion -// !DIAGNOSTICS: -UNUSED_PARAMETER - -fun interface SuspendRunnable { - suspend fun invoke() -} - -fun foo(s: SuspendRunnable) {} - -fun test(f: () -> Unit) { - foo { } - foo(f) -} - diff --git a/compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt b/compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt index aaf124a2478..6097f0b75d0 100644 --- a/compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt +++ b/compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +SuspendConversion // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionWithFunInterfaces.fir.kt b/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionWithFunInterfaces.fir.kt deleted file mode 100644 index 9737580400a..00000000000 --- a/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionWithFunInterfaces.fir.kt +++ /dev/null @@ -1,21 +0,0 @@ -// !LANGUAGE: +SuspendConversion -// !DIAGNOSTICS: -UNUSED_PARAMETER - -fun interface SuspendRunnable { - suspend fun invoke() -} - -fun foo1(s: SuspendRunnable) {} -fun bar1() {} - -fun bar2(s: String = ""): Int = 0 - -fun bar3() {} -suspend fun bar3(s: String = ""): Int = 0 - -fun test() { - foo1(::bar1) - foo1(::bar2) - - foo1(::bar3) // Should be ambiguity -} diff --git a/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionWithFunInterfaces.kt b/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionWithFunInterfaces.kt index 9737580400a..fbcbf56ace7 100644 --- a/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionWithFunInterfaces.kt +++ b/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionWithFunInterfaces.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +SuspendConversion // !DIAGNOSTICS: -UNUSED_PARAMETER