[Test] KT-61360: add tests for the IrFakeOverrideBuilder
Add tests for fake overrides with focus on java interoperability Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
30aae741a6
commit
82255d5ee8
@@ -0,0 +1,25 @@
|
||||
// FIR_IDENTICAL
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// FILE: Java1.java
|
||||
public class Java1 {
|
||||
public Void foo(){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
class A : Java1()
|
||||
|
||||
class B : Java1() {
|
||||
override fun foo(): Void {
|
||||
return null!!
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val k: Void? = A().foo()
|
||||
val k2: Any = A().foo()
|
||||
val k3: Void = B().foo()
|
||||
val k4: Any = B().foo()
|
||||
}
|
||||
Reference in New Issue
Block a user