FirClassSubstitutionScope: fix overridden symbols traversing

This commit is contained in:
Mikhail Glukhikh
2020-07-14 16:02:57 +03:00
parent 10a1d5c03b
commit e2678149cb
5 changed files with 82 additions and 4 deletions
@@ -0,0 +1,36 @@
// FILE: Named.java
public interface Named {
String getName();
}
// FILE: Psi.java
public interface Psi<D> {
}
// FILE: Member.java
public interface Member<D> extends Psi<D> {
}
// FILE: Test.kt
public interface Light
public class LightMember<D> : Light, Member<D> {
override fun getName(): String = "Light"
}
public interface Field : Named
public class LightField<D> : LightMember<Any>(), Field {
fun test(other: Any?) {
if (other is LightField<*>) {
other.name
}
}
}
@@ -0,0 +1,30 @@
FILE: Test.kt
public abstract interface Light : R|kotlin/Any| {
}
public final class LightMember<D> : R|Light|, R|Member<D>| {
public constructor<D>(): R|LightMember<D>| {
super<R|kotlin/Any|>()
}
public final override fun getName(): R|kotlin/String| {
^getName String(Light)
}
}
public abstract interface Field : R|Named| {
}
public final class LightField<D> : R|LightMember<kotlin/Any>|, R|Field| {
public constructor<D>(): R|LightField<D>| {
super<R|LightMember<kotlin/Any>|>()
}
public final fun test(other: R|kotlin/Any?|): R|kotlin/Unit| {
when () {
(R|<local>/other| is R|LightField<*>|) -> {
R|<local>/other|.R|/LightMember.name|
}
}
}
}