Added "Add remaining branches with import" quick fix #KT-16033 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
2fa4c28e0f
commit
fe0f44da94
@@ -0,0 +1,12 @@
|
||||
// "Add remaining branches with import" "true"
|
||||
// WITH_RUNTIME
|
||||
enum class Foo {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun foo(e: Foo) {
|
||||
when<caret> (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import Foo.*
|
||||
|
||||
// "Add remaining branches with import" "true"
|
||||
// WITH_RUNTIME
|
||||
enum class Foo {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun foo(e: Foo) {
|
||||
when<caret> (e) {
|
||||
A -> TODO()
|
||||
B -> TODO()
|
||||
C -> TODO()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Add remaining branches with import" "true"
|
||||
// WITH_RUNTIME
|
||||
import Foo.*
|
||||
|
||||
enum class Foo {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun foo(e: Foo) {
|
||||
when<caret> (e) {
|
||||
A, Foo.B -> TODO()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// "Add remaining branches with import" "true"
|
||||
// WITH_RUNTIME
|
||||
import Foo.*
|
||||
|
||||
enum class Foo {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun foo(e: Foo) {
|
||||
when<caret> (e) {
|
||||
A, B -> TODO()
|
||||
C -> TODO()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// "Add remaining branches with import" "true"
|
||||
// WITH_RUNTIME
|
||||
import Foo.*
|
||||
|
||||
enum class Foo {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
enum class Bar {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun foo(e: Foo) {
|
||||
when (e) {
|
||||
A -> TODO()
|
||||
B -> TODO()
|
||||
C -> TODO()
|
||||
}
|
||||
}
|
||||
fun bar(e: Bar) {
|
||||
when<caret> (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// "Add remaining branches with import" "true"
|
||||
// WITH_RUNTIME
|
||||
import Foo.*
|
||||
|
||||
enum class Foo {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
enum class Bar {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun foo(e: Foo) {
|
||||
when (e) {
|
||||
A -> TODO()
|
||||
B -> TODO()
|
||||
C -> TODO()
|
||||
}
|
||||
}
|
||||
fun bar(e: Bar) {
|
||||
when<caret> (e) {
|
||||
Bar.A -> TODO()
|
||||
Bar.B -> TODO()
|
||||
Bar.C -> TODO()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// "Add remaining branches with import" "true"
|
||||
// WITH_RUNTIME
|
||||
import Foo.*
|
||||
|
||||
enum class Foo {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
enum class Baz {
|
||||
AA, B, CC
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun foo(e: Foo) {
|
||||
when (e) {
|
||||
A -> TODO()
|
||||
B -> TODO()
|
||||
C -> TODO()
|
||||
}
|
||||
}
|
||||
fun baz(e: Baz) {
|
||||
when<caret> (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// "Add remaining branches with import" "true"
|
||||
// WITH_RUNTIME
|
||||
import Baz.*
|
||||
import Foo.*
|
||||
import Foo.B
|
||||
|
||||
enum class Foo {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
enum class Baz {
|
||||
AA, B, CC
|
||||
}
|
||||
|
||||
class Test {
|
||||
fun foo(e: Foo) {
|
||||
when (e) {
|
||||
A -> TODO()
|
||||
B -> TODO()
|
||||
C -> TODO()
|
||||
}
|
||||
}
|
||||
fun baz(e: Baz) {
|
||||
when<caret> (e) {
|
||||
AA -> TODO()
|
||||
Baz.B -> TODO()
|
||||
CC -> TODO()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user