Files
kotlin-fork/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava.fir.kt
T
Denis Zharkov 72b09ff323 FIR: Rename FirSuperTypeScope and reuse it for type parameter type
It would allow ConeKotlinType.scope return FirTypeScope
and thus pulling down org.jetbrains.kotlin.fir.scopes.FirScope#processOverriddenFunctions
(See the following commits)
2020-06-11 11:31:31 +03:00

53 lines
1.2 KiB
Kotlin
Vendored

// FILE: KotlinFile.kt
abstract class KotlinClass : JavaClass(), KotlinInterface, JavaInterface {
override fun getSomething1(): Int = 1
override fun getSomething3(): String = ""
override fun setSomething4(value: String) {}
override fun getSomething5(): String = ""
}
interface KotlinInterface {
public fun getSomething1(): Int
public fun getSomething4(): String
}
fun foo(k: KotlinClass) {
useInt(k.getSomething1())
useInt(k.something1)
useInt(k.getSomething2())
useInt(k.something2)
useString(k.getSomething3())
useString(k.something3)
k.setSomething4("")
k.something4 += ""
k.<!INAPPLICABLE_CANDIDATE!>setSomething4<!>(null)
k.something4 = null
useString(k.getSomething5())
useString(k.something5)
k.setSomething5(1)
k.something5 = 1
}
fun useInt(i: Int) {}
fun useString(i: String) {}
// FILE: JavaClass.java
public class JavaClass {
public int getSomething1() { return 1; }
public int getSomething2() { return 1; }
public Object getSomething3() { return null; }
}
// FILE: JavaInterface.java
public interface JavaInterface {
String getSomething4();
void setSomething4(String value);
Object getSomething5();
void setSomething5(Object value);
}