Inspection for experimental coroutines imports migration (KT-25251)

#KT-25251 In Progress
This commit is contained in:
Nikolay Krasko
2018-07-09 13:33:54 +03:00
parent 5b34498162
commit f9de91016a
22 changed files with 362 additions and 0 deletions
+1
View File
@@ -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> {
}
}
+9
View File
@@ -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