Quick-fix for header without implementation + a set of tests #KT-14908 Fixed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// "Create header class implementation for platform JS" "true"
|
||||
|
||||
header enum class <caret>MyEnum {
|
||||
FIRST,
|
||||
SECOND,
|
||||
LAST;
|
||||
|
||||
val num: Int
|
||||
|
||||
companion object {
|
||||
fun byNum(num: Int): MyEnum = when (num) {
|
||||
1 -> FIRST
|
||||
2 -> SECOND
|
||||
else -> LAST
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// "Create header class implementation for platform JS" "true"
|
||||
|
||||
header enum class MyEnum {
|
||||
FIRST,
|
||||
SECOND,
|
||||
LAST;
|
||||
|
||||
val num: Int
|
||||
|
||||
companion object {
|
||||
fun byNum(num: Int): MyEnum = when (num) {
|
||||
1 -> FIRST
|
||||
2 -> SECOND
|
||||
else -> LAST
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// MyEnum: to be implemented
|
||||
@@ -0,0 +1,17 @@
|
||||
// MyEnum: to be implemented
|
||||
impl enum class MyEnum {
|
||||
FIRST,
|
||||
SECOND,
|
||||
LAST;
|
||||
|
||||
companion object {
|
||||
fun byNum(num: Int): MyEnum = when (num) {
|
||||
1 -> FIRST
|
||||
2 -> SECOND
|
||||
else -> LAST
|
||||
}
|
||||
}
|
||||
|
||||
impl val num: Int
|
||||
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
Reference in New Issue
Block a user