K2: Unwrap fake overrides before using them as DFA identifiers

It's necessary because even for stable a.b.c.d we can't guarantee that
this reference will always point to the same symbol because
different capture type instantiations generate different scopes
with different resulting symbol instances.
This commit is contained in:
Denis.Zharkov
2022-12-07 15:43:48 +01:00
committed by Space Team
parent 9af3e5704d
commit a4c5e1bc87
3 changed files with 19 additions and 5 deletions
@@ -43,6 +43,6 @@ fun test5(x: Inv<out Any?>) {
fun test6(x: Inv<out String?>) {
when (val y = x.data) {
is String -> x.data<!UNSAFE_CALL!>.<!>length // should be ok
is String -> x.data.length // should be ok
}
}