Intentions: Implement "Convert sealed class to enum" intention

#KT-14245 Fixed
This commit is contained in:
Alexey Sedunov
2016-10-10 20:16:18 +03:00
parent 2187a77646
commit ec00b9f3ea
23 changed files with 358 additions and 1 deletions
@@ -0,0 +1,7 @@
enum class MyClass(val s: String = "") {
FOO("FOO"), BAR("BAR"), DEFAULT();
fun foo() {
}
}
@@ -0,0 +1,9 @@
sealed class MyClass(val s: String = "") {
fun foo() {
}
object FOO : MyEnum("FOO")
object BAR : MyEnum("BAR")
object DEFAULT : MyEnum()
}
@@ -0,0 +1,5 @@
<html>
<body>
This intention converts a sealed class to an enum class and replaces inheriting objects with enum entries
</body>
</html>