Add test for obsolete issue
#KT-23531 Obsolete
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class Scope
|
||||
|
||||
fun <T> simpleAsync0(block: Scope.() -> T) {}
|
||||
fun <T> simpleAsync1(block: suspend Scope.() -> T) {}
|
||||
suspend fun <T> simpleAsync2(block: Scope.() -> T) {}
|
||||
suspend fun <T> simpleAsync3(block: suspend Scope.() -> T) {}
|
||||
|
||||
fun insideJob0() = doTheJob0()
|
||||
fun insideJob1() = doTheJob1()
|
||||
suspend fun insideJob2() = doTheJob2()
|
||||
suspend fun insideJob3() = doTheJob3()
|
||||
|
||||
fun doTheJob0() = simpleAsync0 { <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>insideJob0()<!> }
|
||||
fun doTheJob1() = simpleAsync1 { <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>insideJob1()<!> }
|
||||
suspend fun doTheJob2() = simpleAsync2 { <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!><!NON_LOCAL_SUSPENSION_POINT!>insideJob2<!>()<!> }
|
||||
suspend fun doTheJob3() = simpleAsync3 { <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>insideJob3()<!> }
|
||||
@@ -0,0 +1,21 @@
|
||||
package
|
||||
|
||||
public fun doTheJob0(): kotlin.Unit
|
||||
public fun doTheJob1(): kotlin.Unit
|
||||
public suspend fun doTheJob2(): kotlin.Unit
|
||||
public suspend fun doTheJob3(): kotlin.Unit
|
||||
public fun insideJob0(): kotlin.Unit
|
||||
public fun insideJob1(): kotlin.Unit
|
||||
public suspend fun insideJob2(): kotlin.Unit
|
||||
public suspend fun insideJob3(): kotlin.Unit
|
||||
public fun </*0*/ T> simpleAsync0(/*0*/ block: Scope.() -> T): kotlin.Unit
|
||||
public fun </*0*/ T> simpleAsync1(/*0*/ block: suspend Scope.() -> T): kotlin.Unit
|
||||
public suspend fun </*0*/ T> simpleAsync2(/*0*/ block: Scope.() -> T): kotlin.Unit
|
||||
public suspend fun </*0*/ T> simpleAsync3(/*0*/ block: suspend Scope.() -> T): kotlin.Unit
|
||||
|
||||
public final class Scope {
|
||||
public constructor Scope()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -9890,6 +9890,24 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveCalls")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class RecursiveCalls extends AbstractDiagnosticsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInRecursiveCalls() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt23531.kt")
|
||||
public void testKt23531() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveCalls/kt23531.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+18
@@ -9890,6 +9890,24 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveCalls")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class RecursiveCalls extends AbstractDiagnosticsUsingJavacTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInRecursiveCalls() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt23531.kt")
|
||||
public void testKt23531() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveCalls/kt23531.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user