UsePropertyAccessSyntaxIntention: handled case when property type is more specific
This commit is contained in:
+4
@@ -0,0 +1,4 @@
|
||||
interface JavaInterface {
|
||||
Object getSomething();
|
||||
void setSomething(Object value);
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
abstract class KotlinClass : JavaInterface {
|
||||
override fun getSomething(): String = ""
|
||||
}
|
||||
|
||||
fun foo(k: KotlinClass) {
|
||||
k.<caret>setSomething(1)
|
||||
}
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
interface JavaInterface {
|
||||
Object getSomething();
|
||||
void setSomething(Object value);
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
interface JavaInterface {
|
||||
Object getSomething();
|
||||
void setSomething(Object value);
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
abstract class KotlinClass : JavaInterface {
|
||||
override fun getSomething(): String = ""
|
||||
}
|
||||
|
||||
fun foo(k: KotlinClass, p: Any) {
|
||||
if (p is String) {
|
||||
k.<caret>setSomething(p)
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
abstract class KotlinClass : JavaInterface {
|
||||
override fun getSomething(): String = ""
|
||||
}
|
||||
|
||||
fun foo(k: KotlinClass, p: Any) {
|
||||
if (p is String) {
|
||||
k.something = p
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user