Inspection for experimental coroutines imports migration (KT-25251)
#KT-25251 In Progress
This commit is contained in:
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.inspections.migration.ObsoleteExperimentalCoroutinesInspection
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: buildSequence
|
||||
import kotlin.coroutines.<caret>experimental.buildSequence
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = buildSequence<Int> {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: buildSequence
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = buildSequence<Int> {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
|
||||
fun test(con: Continuation<Int>) {
|
||||
con.<caret>resume(12)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
|
||||
fun test(con: Continuation<Int>) {
|
||||
con.<caret>resume(12)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
|
||||
fun test(con: Continuation<Int>) {
|
||||
con.<caret>resumeWithException(RuntimeException("Haha"))
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
|
||||
fun test(con: Continuation<Int>) {
|
||||
con.<caret>resumeWithException(RuntimeException("Haha"))
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: coroutines
|
||||
|
||||
import kotlin.coroutines.<caret>experimental.*
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: coroutines
|
||||
|
||||
import kotlin.coroutines.*
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: kotlinx
|
||||
|
||||
import kotlinx.coroutines.<caret>experimental.delay
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: kotlinx
|
||||
|
||||
import kotlinx.coroutines.delay
|
||||
Reference in New Issue
Block a user