Minor. Add regression test for KT-18292
#KT-18292: Obsolete
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// SKIP_TXT
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
interface Job : CoroutineContext.Element {}
|
||||
interface Deferred<out T> : Job {
|
||||
suspend fun await(): T
|
||||
}
|
||||
fun <T> async(<!UNUSED_PARAMETER!>block<!>: suspend () -> T): Deferred<T> = TODO()
|
||||
|
||||
suspend fun fib(n: Long) =
|
||||
async {
|
||||
when {
|
||||
n < 2 -> n
|
||||
else -> <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>fib(n - 1)<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>await<!>() <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> fib(n - 2).<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>await<!>()
|
||||
}
|
||||
}
|
||||
+6
@@ -1320,6 +1320,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt18292.kt")
|
||||
public void testKt18292() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaExpectedType.kt")
|
||||
public void testLambdaExpectedType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/lambdaExpectedType.kt");
|
||||
|
||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+6
@@ -1320,6 +1320,12 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt18292.kt")
|
||||
public void testKt18292() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaExpectedType.kt")
|
||||
public void testLambdaExpectedType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/lambdaExpectedType.kt");
|
||||
|
||||
Reference in New Issue
Block a user