Quick-fix for header without implementation + a set of tests #KT-14908 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Create header class implementation for platform JS" "true"
|
||||
|
||||
header abstract class <caret>Abstract {
|
||||
fun foo(param: String): Int
|
||||
|
||||
abstract fun String.bar(y: Double): Boolean
|
||||
|
||||
val isGood: Boolean
|
||||
|
||||
abstract var status: Int
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Create header class implementation for platform JS" "true"
|
||||
|
||||
header abstract class Abstract {
|
||||
fun foo(param: String): Int
|
||||
|
||||
abstract fun String.bar(y: Double): Boolean
|
||||
|
||||
val isGood: Boolean
|
||||
|
||||
abstract var status: Int
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// Abstract: to be implemented
|
||||
@@ -0,0 +1,13 @@
|
||||
// Abstract: to be implemented
|
||||
impl abstract class Abstract {
|
||||
|
||||
abstract fun String.bar(y: Double): Boolean
|
||||
|
||||
abstract var status: Int
|
||||
impl fun foo(param: String): Int {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
impl val isGood: Boolean
|
||||
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Create header class implementation for platform JVM" "true"
|
||||
|
||||
header class <caret>My {
|
||||
fun foo(param: String): Int
|
||||
|
||||
fun String.bar(y: Double): Boolean
|
||||
|
||||
fun baz(): Unit
|
||||
|
||||
constructor(flag: Boolean)
|
||||
|
||||
val isGood: Boolean
|
||||
|
||||
var status: Int
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Create header class implementation for platform JVM" "true"
|
||||
|
||||
header class My {
|
||||
fun foo(param: String): Int
|
||||
|
||||
fun String.bar(y: Double): Boolean
|
||||
|
||||
fun baz(): Unit
|
||||
|
||||
constructor(flag: Boolean)
|
||||
|
||||
val isGood: Boolean
|
||||
|
||||
var status: Int
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// My: to be implemented
|
||||
@@ -0,0 +1,23 @@
|
||||
// My: to be implemented
|
||||
impl class My {
|
||||
impl fun foo(param: String): Int {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
impl fun String.bar(y: Double): Boolean {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
impl fun baz() {}
|
||||
|
||||
constructor(flag: Boolean) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
impl val isGood: Boolean
|
||||
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
impl var status: Int
|
||||
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
set(value) {}
|
||||
|
||||
}
|
||||
@@ -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.
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Create header function implementation for platform JVM" "true"
|
||||
|
||||
header fun <caret>foo(arg: Int): String
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Create header function implementation for platform JVM" "true"
|
||||
|
||||
header fun foo(arg: Int): String
|
||||
@@ -0,0 +1 @@
|
||||
// foo: to be implemented
|
||||
@@ -0,0 +1,4 @@
|
||||
// foo: to be implemented
|
||||
impl fun foo(arg: Int): String {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Create header interface implementation for platform JVM" "true"
|
||||
|
||||
header interface <caret>Interface {
|
||||
fun foo(param: String): Int
|
||||
|
||||
fun String.bar(y: Double): Boolean
|
||||
|
||||
val isGood: Boolean
|
||||
|
||||
var status: Int
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Create header interface implementation for platform JVM" "true"
|
||||
|
||||
header interface Interface {
|
||||
fun foo(param: String): Int
|
||||
|
||||
fun String.bar(y: Double): Boolean
|
||||
|
||||
val isGood: Boolean
|
||||
|
||||
var status: Int
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// Interface: to be implemented
|
||||
@@ -0,0 +1,10 @@
|
||||
// Interface: to be implemented
|
||||
impl interface Interface {
|
||||
fun foo(param: String): Int
|
||||
|
||||
fun String.bar(y: Double): Boolean
|
||||
|
||||
val isGood: Boolean
|
||||
|
||||
var status: Int
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Create header class implementation for platform JVM" "true"
|
||||
|
||||
header class <caret>WithNested {
|
||||
fun foo(): Int
|
||||
|
||||
class Nested {
|
||||
fun bar() = "Nested"
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun baz() = "Inner"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Create header class implementation for platform JVM" "true"
|
||||
|
||||
header class WithNested {
|
||||
fun foo(): Int
|
||||
|
||||
class Nested {
|
||||
fun bar() = "Nested"
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun baz() = "Inner"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// WithNested: to be implemented
|
||||
@@ -0,0 +1,15 @@
|
||||
// WithNested: to be implemented
|
||||
impl class WithNested {
|
||||
|
||||
class Nested {
|
||||
fun bar() = "Nested"
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun baz() = "Inner"
|
||||
}
|
||||
|
||||
impl fun foo(): Int {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Create header class implementation for platform JVM" "true"
|
||||
|
||||
header object <caret>Object {
|
||||
fun foo(): String
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Create header class implementation for platform JVM" "true"
|
||||
|
||||
header object Object {
|
||||
fun foo(): String
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// Object: to be implemented
|
||||
@@ -0,0 +1,6 @@
|
||||
// Object: to be implemented
|
||||
impl object Object {
|
||||
impl fun foo(): String {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Create header property implementation for platform JVM" "true"
|
||||
|
||||
header var <caret>x: Int
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Create header property implementation for platform JVM" "true"
|
||||
|
||||
header var x: Int
|
||||
@@ -0,0 +1 @@
|
||||
// x: to be implemented
|
||||
@@ -0,0 +1,4 @@
|
||||
// x: to be implemented
|
||||
impl var x: Int
|
||||
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
set(value) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Create header class implementation for platform JS" "true"
|
||||
|
||||
header sealed class <caret>Sealed {
|
||||
object Obj : Sealed()
|
||||
|
||||
class Klass(val x: Int) : Sealed()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Create header class implementation for platform JS" "true"
|
||||
|
||||
header sealed class Sealed {
|
||||
object Obj : Sealed()
|
||||
|
||||
class Klass(val x: Int) : Sealed()
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// Sealed: to be implemented
|
||||
@@ -0,0 +1,6 @@
|
||||
// Sealed: to be implemented
|
||||
impl sealed class Sealed {
|
||||
object Obj : Sealed()
|
||||
|
||||
class Klass(val x: Int) : Sealed()
|
||||
}
|
||||
Reference in New Issue
Block a user