[KT-24335]
Fix inheritance from interface which is also inherited from an external interface Add test case
This commit is contained in:
committed by
Roman Artemev
parent
93f5fe2451
commit
4f2d5baa5d
+31
@@ -0,0 +1,31 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1093
|
||||
|
||||
external interface Foo {
|
||||
var externalProperty: String?
|
||||
get() = definedExternally
|
||||
set(it) = definedExternally
|
||||
}
|
||||
|
||||
interface Bar : Foo
|
||||
|
||||
class CCC: Foo
|
||||
|
||||
class DDD: Bar
|
||||
|
||||
interface Bar2: Foo {
|
||||
override var externalProperty: String?
|
||||
get() = "Bar2"
|
||||
set(value) {}
|
||||
}
|
||||
|
||||
class FFF: Bar2
|
||||
|
||||
fun box(): String {
|
||||
val c = CCC()
|
||||
if (c.externalProperty != null) return "fail1"
|
||||
val d = DDD()
|
||||
if (d.externalProperty != null) return "fail2"
|
||||
val f = FFF()
|
||||
if (f.externalProperty != "Bar2") return "fail3"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user