Remove old buildIterator import (KT-26679)
This commit is contained in:
+2
-1
@@ -233,7 +233,8 @@ private class ExperimentalImportUsage : CoroutineMigrationProblem {
|
||||
)
|
||||
|
||||
private val IMPORTS_TO_REMOVE = setOf(
|
||||
"kotlin.coroutines.experimental.buildSequence"
|
||||
"kotlin.coroutines.experimental.buildSequence",
|
||||
"kotlin.coroutines.experimental.buildIterator"
|
||||
)
|
||||
|
||||
private const val EXPERIMENTAL_COROUTINES_MARKER = "experimental"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Using 'buildIterator(noinline suspend SequenceScope<T>.() -> Unit): Iterator<T>' is an error. Use 'iterator { }' function instead.
|
||||
// WITH_RUNTIME
|
||||
import kotlin.coroutines.<caret>experimental.buildIterator
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = buildIterator<Int> {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Using 'buildIterator(noinline suspend SequenceScope<T>.() -> Unit): Iterator<T>' is an error. Use 'iterator { }' function instead.
|
||||
// WITH_RUNTIME<caret>
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = buildIterator<Int> {
|
||||
}
|
||||
}
|
||||
@@ -8317,6 +8317,11 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/obsoleteCoroutines"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("buildIteratorImport.kt")
|
||||
public void testBuildIteratorImport() throws Exception {
|
||||
runTest("idea/testData/quickfix/obsoleteCoroutines/buildIteratorImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("buildSequence.kt")
|
||||
public void testBuildSequence() throws Exception {
|
||||
runTest("idea/testData/quickfix/obsoleteCoroutines/buildSequence.kt");
|
||||
|
||||
Reference in New Issue
Block a user