[FIR] Prevent duplicate direct overridden-s from substitution overrides

This change prevents going up the scopes once we find a
substitution override. Whatever we'd find by going further is not
going to be a direct overridden anymore, so it would lead to incorrect
results when collecting direct overridden-s. Without this change, we get
error modules in FT intellij.
This commit is contained in:
Nikolay Lunyak
2023-07-28 16:31:59 +03:00
committed by Space Team
parent 61448531cb
commit 97b00793b4
8 changed files with 53 additions and 11 deletions
@@ -0,0 +1,14 @@
// FIR_IDENTICAL
interface Foo<T> {
fun foo() {}
fun foo(param: Int = 1) {}
}
open class Test<K> : Foo<K> {
override fun foo() {}
}
open class Rest<R> : Test<R>(), Foo<R>
class Baz : Rest<Int>() {}