Quick Fixes: Support cross-language "Create from Usage" with Kotlin target

This commit is contained in:
Alexey Sedunov
2017-12-13 17:06:54 +03:00
parent d44313876c
commit 908bf71ae6
48 changed files with 929 additions and 127 deletions
@@ -0,0 +1,6 @@
class K {
fun foo(i: Int, s: String): Boolean {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -0,0 +1,6 @@
// "Add method 'foo' to 'K'" "true"
class J {
void test(K k) {
boolean b = k.<caret>foo(1, "2");
}
}
@@ -0,0 +1,3 @@
class K {
}
@@ -0,0 +1,6 @@
// "Add method 'foo' to 'K'" "true"
class J {
void test(K k) {
boolean b = k.<caret>foo(1, "2");
}
}
@@ -0,0 +1,9 @@
class K {
companion object {
@JvmStatic
fun foo(i: Int, s: String): Boolean {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
}
@@ -0,0 +1,7 @@
// "Add method 'foo' to 'K'" "true"
// WITH_RUNTIME
class J {
void test() {
boolean b = K.<caret>foo(1, "2");
}
}
@@ -0,0 +1,7 @@
// "Add method 'foo' to 'K'" "true"
// WITH_RUNTIME
class J {
void test() {
boolean b = K.<caret>foo(1, "2");
}
}
@@ -0,0 +1,7 @@
@file:JvmName("TestKt")
fun test() {}
fun foo(i: Int, s: String): Boolean {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -0,0 +1,6 @@
// "Add method 'foo' to 'TestKt'" "true"
class J {
void test() {
boolean b = TestKt.<caret>foo(1, "2");
}
}
@@ -0,0 +1,3 @@
@file:JvmName("TestKt")
fun test() {}
@@ -0,0 +1,6 @@
// "Add method 'foo' to 'TestKt'" "true"
class J {
void test() {
boolean b = TestKt.<caret>foo(1, "2");
}
}