A proper modality calculation was missing in IR fake override construction algorithm

#KT-41765 Fixed
This commit is contained in:
Alexander Gorshenev
2020-09-10 20:56:01 +03:00
parent 2886f48795
commit 744f290fc4
10 changed files with 99 additions and 18 deletions
+25
View File
@@ -0,0 +1,25 @@
// MODULE: lib
// FILE: lib.kt
// KT-41765
interface X {
override fun toString() :String
}
interface Y
abstract class A: Y, X
// MODULE: main(lib)
// FILE: main.kt
class B: A() {
override fun toString() = "BBB"
}
fun box(): String {
if (B().toString() == "BBB") return "OK"
return "FAIL"
}