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:
committed by
Space Team
parent
9af3e5704d
commit
a4c5e1bc87
@@ -4,7 +4,7 @@ class Data<T>(val s: T)
|
||||
|
||||
fun test(d: Data<out Any>) {
|
||||
if (d.s is String) {
|
||||
d.s.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
d.s.length
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user