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,5 @@
class K {
@JvmField
lateinit var foo: String
}
@@ -0,0 +1,7 @@
// "Add 'lateinit var' property 'foo' to 'K'" "true"
// WITH_RUNTIME
class J {
void test(K k) {
String s = k.<caret>foo;
}
}
@@ -0,0 +1,7 @@
// "Add 'lateinit var' property 'foo' to 'K'" "true"
// WITH_RUNTIME
class J {
void test(K k) {
String s = k.<caret>foo;
}
}
@@ -0,0 +1,5 @@
class K {
@JvmField
var foo: String = TODO("initialize me")
}
@@ -0,0 +1,7 @@
// "Add 'var' property 'foo' to 'K'" "true"
// WITH_RUNTIME
class J {
void test(K k) {
String s = k.<caret>foo;
}
}
@@ -0,0 +1,7 @@
// "Add 'var' property 'foo' to 'K'" "true"
// WITH_RUNTIME
class J {
void test(K k) {
String s = k.<caret>foo;
}
}
@@ -0,0 +1,7 @@
class K {
companion object {
@JvmField
var foo: String = TODO("initialize me")
}
}
@@ -0,0 +1,7 @@
// "Add 'var' property 'foo' to 'K'" "true"
// WITH_RUNTIME
class J {
void test() {
String s = K.<caret>foo;
}
}
@@ -0,0 +1,7 @@
// "Add 'var' property 'foo' to 'K'" "true"
// WITH_RUNTIME
class J {
void test() {
String s = K.<caret>foo;
}
}
@@ -0,0 +1,6 @@
@file:JvmName("TestKt")
fun test() {}
@JvmField
var foo: String = TODO("initialize me")
@@ -0,0 +1,7 @@
// "Add 'var' property 'foo' to 'TestKt'" "true"
// WITH_RUNTIME
class J {
void test() {
String s = TestKt.<caret>foo;
}
}
@@ -0,0 +1,3 @@
@file:JvmName("TestKt")
fun test() {}
@@ -0,0 +1,7 @@
// "Add 'var' property 'foo' to 'TestKt'" "true"
// WITH_RUNTIME
class J {
void test() {
String s = TestKt.<caret>foo;
}
}