Treat nested class of header class as header
Note that the quick fix to implement header class works incorrectly when that class has nested classes at the moment; this should be fixed separately #KT-15494 Fixed #KT-18573 Fixed
This commit is contained in:
+1
-9
@@ -6,12 +6,4 @@ header enum class <caret>MyEnum {
|
||||
LAST;
|
||||
|
||||
val num: Int
|
||||
|
||||
companion object {
|
||||
fun byNum(num: Int): MyEnum = when (num) {
|
||||
1 -> FIRST
|
||||
2 -> SECOND
|
||||
else -> LAST
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,12 +6,4 @@ header enum class MyEnum {
|
||||
LAST;
|
||||
|
||||
val num: Int
|
||||
|
||||
companion object {
|
||||
fun byNum(num: Int): MyEnum = when (num) {
|
||||
1 -> FIRST
|
||||
2 -> SECOND
|
||||
else -> LAST
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,14 +4,7 @@ impl enum class MyEnum {
|
||||
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.
|
||||
|
||||
}
|
||||
@@ -4,10 +4,10 @@ header class <caret>WithNested {
|
||||
fun foo(): Int
|
||||
|
||||
class Nested {
|
||||
fun bar() = "Nested"
|
||||
fun bar()
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun baz() = "Inner"
|
||||
fun baz()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ header class WithNested {
|
||||
fun foo(): Int
|
||||
|
||||
class Nested {
|
||||
fun bar() = "Nested"
|
||||
fun bar()
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun baz() = "Inner"
|
||||
fun baz()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
impl class WithNested {
|
||||
|
||||
class Nested {
|
||||
fun bar() = "Nested"
|
||||
fun bar()
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun baz() = "Inner"
|
||||
fun baz()
|
||||
}
|
||||
|
||||
impl fun foo(): Int {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Create header class implementation for platform JS" "true"
|
||||
|
||||
header sealed class <caret>Sealed {
|
||||
object Obj : Sealed()
|
||||
object Obj : Sealed
|
||||
|
||||
class Klass(val x: Int) : Sealed()
|
||||
class Klass(x: Int) : Sealed
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Create header class implementation for platform JS" "true"
|
||||
|
||||
header sealed class Sealed {
|
||||
object Obj : Sealed()
|
||||
object Obj : Sealed
|
||||
|
||||
class Klass(val x: Int) : Sealed()
|
||||
class Klass(x: Int) : Sealed
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// Sealed: to be implemented
|
||||
impl sealed class Sealed {
|
||||
object Obj : Sealed()
|
||||
object Obj : Sealed
|
||||
|
||||
class Klass(val x: Int) : Sealed()
|
||||
class Klass(x: Int) : Sealed
|
||||
}
|
||||
Reference in New Issue
Block a user