Use OverrideMemberChooserObject to generate actual decls in quick-fixes

This can fix a lot of issues related to inexact generation, in particular
#KT-27093 Fixed
This commit is contained in:
Mikhail Glukhikh
2018-11-13 15:41:23 +03:00
parent 5645b6c1b7
commit 3612c2983e
31 changed files with 261 additions and 162 deletions
@@ -9,5 +9,5 @@ actual abstract class Abstract {
}
actual val isGood: Boolean
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
}
+4 -3
View File
@@ -8,16 +8,17 @@ actual class My {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
actual fun baz() {}
actual fun baz() {
}
actual constructor(flag: Boolean) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
actual val isGood: Boolean
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
actual var status: Int
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
set(value) {}
}
@@ -4,5 +4,6 @@
actual class My {
actual constructor()
actual fun test() {}
actual fun test() {
}
}
@@ -4,5 +4,6 @@
actual class My {
actual constructor(a: Int, b: String)
actual fun test() {}
actual fun test() {
}
}
@@ -4,5 +4,6 @@
actual class My actual constructor(a: Int, b: String) {
actual constructor(b: String, a: Int)
actual fun test() {}
actual fun test() {
}
}
@@ -3,5 +3,5 @@
actual class <caret>My(actual val name: String) {
actual val age: String
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
}
@@ -6,7 +6,7 @@ actual class <caret>My {
actual val correct = true
actual val x: String
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
actual val pi: Double
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
}
@@ -2,6 +2,6 @@
// DISABLE-ERRORS
actual class My {
// Incompilable function
actual fun foo() {}
actual fun foo() {
}
}
@@ -0,0 +1,7 @@
// "Create actual class for module proj_JVM (JVM)" "true"
import kotlin.random.Random
expect class My<caret>Generator {
fun generate(): Random
}
@@ -0,0 +1,7 @@
// "Create actual class for module proj_JVM (JVM)" "true"
import kotlin.random.Random
expect class MyGenerator {
fun generate(): Random
}
@@ -0,0 +1 @@
// MyGenerator: to be implemented
@@ -0,0 +1,8 @@
import kotlin.random.Random
// MyGenerator: to be implemented
actual class MyGenerator {
actual fun generate(): Random {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -3,7 +3,8 @@
actual class WithCompanion {
actual companion object {
actual fun foo() {}
actual fun foo() {
}
}
}
@@ -1,4 +1,5 @@
// to be created
actual class C {
actual fun f(p: Int) {}
actual fun f(p: Int) {
}
}
+1 -1
View File
@@ -5,6 +5,6 @@ actual enum class MyEnum {
LAST;
actual val num: Int
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
}
@@ -9,7 +9,8 @@ actual interface Interface {
actual var status: Int
actual class Nested {
actual fun bar() {}
actual fun bar() {
}
}
}
@@ -5,11 +5,13 @@ actual class WithNested {
}
actual class Nested {
actual fun bar() {}
actual fun bar() {
}
}
actual inner class Inner {
actual fun baz() {}
actual fun baz() {
}
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// x: to be implemented
actual var x: Int
get() = TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
set(value) {}
@@ -3,4 +3,5 @@
package test
actual fun testHelper() {}
actual fun testHelper() {
}
@@ -1,2 +1,3 @@
// testHelper: to be implemented
actual fun testHelper() {}
actual fun testHelper() {
}