Introduce "add missing actual members" quick-fix #KT-18449 Fixed

This commit is contained in:
Mikhail Glukhikh
2017-10-03 16:21:15 +03:00
committed by Mikhail Glukhikh
parent 1b0421d27b
commit 739b21f519
24 changed files with 288 additions and 7 deletions
@@ -0,0 +1,5 @@
// DISABLE-ERRORS
expect class My {
fun foo(param: String): Int
}
@@ -0,0 +1,5 @@
// DISABLE-ERRORS
expect class My {
fun foo(param: String): Int
}
@@ -0,0 +1,4 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class <caret>My
@@ -0,0 +1,8 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class My {
actual fun foo(param: String): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -0,0 +1,7 @@
// DISABLE-ERRORS
expect class My {
fun foo(param: String): Int
fun foo(param: Int): Int
}
@@ -0,0 +1,7 @@
// DISABLE-ERRORS
expect class My {
fun foo(param: String): Int
fun foo(param: Int): Int
}
@@ -0,0 +1,6 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class <caret>My {
fun foo(param: String) = 42
}
@@ -0,0 +1,9 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class My {
fun foo(param: String) = 42
actual fun foo(param: Int): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -0,0 +1,11 @@
// DISABLE-ERRORS
expect class My {
fun foo(param: String): Int
val x: String
val pi: Double
val correct: Boolean
}
@@ -0,0 +1,11 @@
// DISABLE-ERRORS
expect class My {
fun foo(param: String): Int
val x: String
val pi: Double
val correct: Boolean
}
@@ -0,0 +1,8 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class <caret>My {
actual fun foo(param: String) = 42
actual val correct = true
}
@@ -0,0 +1,12 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class <caret>My {
actual fun foo(param: String) = 42
actual val correct = true
actual val x: String
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
actual val pi: Double
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -0,0 +1,7 @@
// DISABLE-ERRORS
expect class WithPrimaryConstructor(x: Int, s: String) {
fun bar(x: String)
val z: Double
}
@@ -0,0 +1,7 @@
// DISABLE-ERRORS
expect class WithPrimaryConstructor(x: Int, s: String) {
fun bar(x: String)
val z: Double
}
@@ -0,0 +1,8 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class <caret>WithPrimaryConstructor {
fun bar(x: String) {}
val z: Double = 3.14
}
@@ -0,0 +1,8 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class WithPrimaryConstructor actual constructor(x: Int, s: String) {
fun bar(x: String) {}
val z: Double = 3.14
}
@@ -0,0 +1,9 @@
// DISABLE-ERRORS
expect class WithSecondaryConstructor {
constructor(x: Int, s: String)
fun bar(x: String)
val z: Double
}
@@ -0,0 +1,9 @@
// DISABLE-ERRORS
expect class WithSecondaryConstructor {
constructor(x: Int, s: String)
fun bar(x: String)
val z: Double
}
@@ -0,0 +1,8 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class <caret>WithSecondaryConstructor {
fun bar(x: String) {}
val z: Double = 3.14
}
@@ -0,0 +1,12 @@
// "Add missing actual members" "true"
// DISABLE-ERRORS
actual class WithSecondaryConstructor {
fun bar(x: String) {}
val z: Double = 3.14
actual constructor(x: Int, s: String) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}