[NI] Add test for obsolete issue
#KT-30858 Obsolete
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// IGNORE_BACKEND: JVM_IR, NATIVE
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
class MyReceiveChannel<out E>
|
||||
interface MyProducerScope<in E>
|
||||
interface MyCoroutineScope
|
||||
|
||||
suspend inline fun <E> MyReceiveChannel<E>.myConsumeEach(action: (E) -> Unit) {}
|
||||
|
||||
suspend fun myDelay(timeMillis: Long) {}
|
||||
|
||||
fun myLaunch(
|
||||
block: suspend MyCoroutineScope.() -> Unit
|
||||
) {}
|
||||
|
||||
@UseExperimental(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
public fun <E> myProduce(@BuilderInference block: suspend MyProducerScope<E>.() -> Unit) {}
|
||||
|
||||
fun <T> MyReceiveChannel<T>.debounce(period: Long) {
|
||||
myProduce {
|
||||
myConsumeEach {
|
||||
myLaunch {
|
||||
myDelay(period)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val m = MyReceiveChannel<String>()
|
||||
m.debounce(42)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+5
@@ -6047,6 +6047,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/kt28844.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("kt30858.kt")
|
||||
public void testKt30858() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt30858.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
+5
@@ -6047,6 +6047,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/kt28844.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("kt30858.kt")
|
||||
public void testKt30858() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt30858.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
+5
@@ -6047,6 +6047,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/kt28844.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("kt30858.kt")
|
||||
public void testKt30858() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt30858.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
Generated
+5
@@ -4952,6 +4952,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/kt28844.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("kt30858.kt")
|
||||
public void testKt30858() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt30858.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines");
|
||||
|
||||
+5
@@ -5177,6 +5177,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/kt28844.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("kt30858.kt")
|
||||
public void testKt30858() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt30858.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
Reference in New Issue
Block a user