[KT-24335]

Fix inheritance from interface which is also inherited from an external interface
Add test case
This commit is contained in:
Roman Artemev
2018-05-10 17:11:15 +03:00
committed by Roman Artemev
parent 93f5fe2451
commit 4f2d5baa5d
4 changed files with 42 additions and 1 deletions
@@ -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"
}