Use other property name in Java with Kotlin static import tests

This commit is contained in:
Nikolay Krasko
2018-01-16 18:41:02 +03:00
parent 1c7e42f1d4
commit 704ce121bc
4 changed files with 30 additions and 30 deletions
@@ -1,5 +1,5 @@
// FILE: bar/Foo.before.java // FILE: bar/Foo.before.java
// "Import static method..." "true" // "Import static method 'foo.Bar.getTestValue'" "true"
// ERROR: Unresolved reference: getValue // ERROR: Unresolved reference: getValue
// ACTION: Create method 'foobar' // ACTION: Create method 'foobar'
// WITH_RUNTIME // WITH_RUNTIME
@@ -8,7 +8,7 @@ package bar;
public class Foo { public class Foo {
public void main() public void main()
{ {
getValue<caret>(); getTestValue<caret>();
} }
} }
@@ -18,23 +18,23 @@ package foo
object Bar { object Bar {
companion object { companion object {
@JvmStatic val value = "foobar"; @JvmStatic val testValue = "foobar";
} }
} }
// FILE: bar/Foo.after.java // FILE: bar/Foo.after.java
// "Import static method..." "true" // "Import static method 'foo.Bar.getTestValue'" "true"
// ERROR: Unresolved reference: getValue // ERROR: Unresolved reference: getValue
// ACTION: Create method 'foobar' // ACTION: Create method 'foobar'
// WITH_RUNTIME // WITH_RUNTIME
package bar; package bar;
import static foo.Bar.getValue; import static foo.Bar.getTestValue;
public class Foo { public class Foo {
public void main() public void main()
{ {
getValue<caret>(); getTestValue<caret>();
} }
} }
@@ -1,6 +1,6 @@
// FILE: bar/Foo.before.java // FILE: bar/Foo.before.java
// "Import static method..." "true" // "Import static method 'foo.Bar.getTestValue'" "true"
// ERROR: Unresolved reference: getValue // ERROR: Unresolved reference: getTestValue
// ACTION: Create method 'foobar' // ACTION: Create method 'foobar'
// WITH_RUNTIME // WITH_RUNTIME
package bar; package bar;
@@ -8,7 +8,7 @@ package bar;
public class Foo { public class Foo {
public void main() public void main()
{ {
getValue<caret>(); getTestValue<caret>();
} }
} }
@@ -18,25 +18,25 @@ package foo
object Bar { object Bar {
companion object { companion object {
val value = "foobar" val testValue = "foobar"
@JvmStatic get() { @JvmStatic get() {
} }
} }
} }
// FILE: bar/Foo.after.java // FILE: bar/Foo.after.java
// "Import static method..." "true" // "Import static method 'foo.Bar.getTestValue'" "true"
// ERROR: Unresolved reference: getValue // ERROR: Unresolved reference: getTestValue
// ACTION: Create method 'foobar' // ACTION: Create method 'foobar'
// WITH_RUNTIME // WITH_RUNTIME
package bar; package bar;
import static foo.Bar.getValue; import static foo.Bar.getTestValue;
public class Foo { public class Foo {
public void main() public void main()
{ {
getValue<caret>(); getTestValue<caret>();
} }
} }
@@ -1,6 +1,6 @@
// FILE: bar/Foo.before.java // FILE: bar/Foo.before.java
// "Import static method..." "true" // "Import static method 'foo.Bar.getTestValue'" "true"
// ERROR: Unresolved reference: getValue // ERROR: Unresolved reference: getTestValue
// ACTION: Create method 'foobar' // ACTION: Create method 'foobar'
// WITH_RUNTIME // WITH_RUNTIME
package bar; package bar;
@@ -8,7 +8,7 @@ package bar;
public class Foo { public class Foo {
public void main() public void main()
{ {
getValue<caret>(); getTestValue<caret>();
} }
} }
@@ -17,22 +17,22 @@ public class Foo {
package foo package foo
object Bar { object Bar {
@JvmStatic val value = "foobar"; @JvmStatic val testValue = "foobar";
} }
// FILE: bar/Foo.after.java // FILE: bar/Foo.after.java
// "Import static method..." "true" // "Import static method 'foo.Bar.getTestValue'" "true"
// ERROR: Unresolved reference: getValue // ERROR: Unresolved reference: getTestValue
// ACTION: Create method 'foobar' // ACTION: Create method 'foobar'
// WITH_RUNTIME // WITH_RUNTIME
package bar; package bar;
import static foo.Bar.getValue; import static foo.Bar.getTestValue;
public class Foo { public class Foo {
public void main() public void main()
{ {
getValue<caret>(); getTestValue<caret>();
} }
} }
@@ -1,6 +1,6 @@
// FILE: bar/Foo.before.java // FILE: bar/Foo.before.java
// "Import static method..." "true" // "Import static method 'foo.Bar.getTestValue'" "true"
// ERROR: Unresolved reference: getValue // ERROR: Unresolved reference: getTestValue
// ACTION: Create method 'foobar' // ACTION: Create method 'foobar'
// WITH_RUNTIME // WITH_RUNTIME
package bar; package bar;
@@ -8,7 +8,7 @@ package bar;
public class Foo { public class Foo {
public void main() public void main()
{ {
getValue<caret>(); getTestValue<caret>();
} }
} }
@@ -17,24 +17,24 @@ public class Foo {
package foo package foo
object Bar { object Bar {
val value = "foobar" val testValue = "foobar"
@JvmStatic get() { @JvmStatic get() {
} }
} }
// FILE: bar/Foo.after.java // FILE: bar/Foo.after.java
// "Import static method..." "true" // "Import static method 'foo.Bar.getTestValue'" "true"
// ERROR: Unresolved reference: getValue // ERROR: Unresolved reference: getTestValue
// ACTION: Create method 'foobar' // ACTION: Create method 'foobar'
// WITH_RUNTIME // WITH_RUNTIME
package bar; package bar;
import static foo.Bar.getValue; import static foo.Bar.getTestValue;
public class Foo { public class Foo {
public void main() public void main()
{ {
getValue<caret>(); getTestValue<caret>();
} }
} }