Split 'nothingTypedSuspendFunction' test into two separate tests (for old and new coroutines)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
|||||||
|
// !DIAGNOSTICS: -DEPRECATION
|
||||||
|
// Tail calls are not allowed to be Nothing typed. See KT-15051
|
||||||
|
import kotlin.coroutines.experimental.*
|
||||||
|
import kotlin.coroutines.experimental.intrinsics.*
|
||||||
|
|
||||||
|
suspend fun suspendLogAndThrow(exception: Throwable): Nothing = <!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>suspendCoroutineUninterceptedOrReturn<!> { c ->
|
||||||
|
c.resumeWithException(exception)
|
||||||
|
COROUTINE_SUSPENDED
|
||||||
|
}
|
||||||
+2
-3
@@ -1,7 +1,6 @@
|
|||||||
// Tail calls are not allowed to be Nothing typed. See KT-15051
|
// Tail calls are not allowed to be Nothing typed. See KT-15051
|
||||||
// COMMON_COROUTINES_TEST
|
import kotlin.coroutines.*
|
||||||
import COROUTINES_PACKAGE.*
|
import kotlin.coroutines.intrinsics.*
|
||||||
import COROUTINES_PACKAGE.intrinsics.*
|
|
||||||
|
|
||||||
suspend fun suspendLogAndThrow(exception: Throwable): Nothing = <!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>suspendCoroutineUninterceptedOrReturn<!> { c ->
|
suspend fun suspendLogAndThrow(exception: Throwable): Nothing = <!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>suspendCoroutineUninterceptedOrReturn<!> { c ->
|
||||||
c.<!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>resumeWithException<!>(exception)
|
c.<!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>resumeWithException<!>(exception)
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public suspend fun suspendLogAndThrow(/*0*/ exception: kotlin.Throwable): kotlin.Nothing
|
||||||
+4
-4
@@ -2294,14 +2294,14 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/localFunctions.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/localFunctions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("nothingTypedSuspendFunction.kt")
|
@TestMetadata("nothingTypedSuspendFunction_1_2.kt")
|
||||||
public void testNothingTypedSuspendFunction_1_2() throws Exception {
|
public void testNothingTypedSuspendFunction_1_2() throws Exception {
|
||||||
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt", "kotlin.coroutines.experimental");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction_1_2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("nothingTypedSuspendFunction.kt")
|
@TestMetadata("nothingTypedSuspendFunction_1_3.kt")
|
||||||
public void testNothingTypedSuspendFunction_1_3() throws Exception {
|
public void testNothingTypedSuspendFunction_1_3() throws Exception {
|
||||||
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt", "kotlin.coroutines");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction_1_3.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("recursive.kt")
|
@TestMetadata("recursive.kt")
|
||||||
|
|||||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+4
-4
@@ -2294,14 +2294,14 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/localFunctions.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/localFunctions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("nothingTypedSuspendFunction.kt")
|
@TestMetadata("nothingTypedSuspendFunction_1_2.kt")
|
||||||
public void testNothingTypedSuspendFunction_1_2() throws Exception {
|
public void testNothingTypedSuspendFunction_1_2() throws Exception {
|
||||||
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt", "kotlin.coroutines.experimental");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction_1_2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("nothingTypedSuspendFunction.kt")
|
@TestMetadata("nothingTypedSuspendFunction_1_3.kt")
|
||||||
public void testNothingTypedSuspendFunction_1_3() throws Exception {
|
public void testNothingTypedSuspendFunction_1_3() throws Exception {
|
||||||
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt", "kotlin.coroutines");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction_1_3.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("recursive.kt")
|
@TestMetadata("recursive.kt")
|
||||||
|
|||||||
Reference in New Issue
Block a user