9807c67ae4
If some java class has multiple supertypes then we need to collect overriddens from all those types directly, even if superTypeScope (which is FirTypeIntersectionScope in this case) returns only one symbol from one of this types (not intersection one) This is needed to proper enhancement in cases when some type occurs multiple times in supertypes graph with different nullability of arguments: class ConcurrentHashMap<K, V> : AbstractMap<K!, V!>, MutableMap<K, V> If we try to find method `get(key: K): V` supertype scope returns `AbstractMap.get(key: K!): V!` (because it actually overrides `MutableMap(key: K): V?`), but we need to get both symbols to properly enhance types for `ConcurrentHashMap.remove`
58 lines
965 B
Plaintext
Vendored
58 lines
965 B
Plaintext
Vendored
class C {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
val test1: Int
|
|
field = 0
|
|
get
|
|
|
|
val test2: Int
|
|
get(): Int {
|
|
return 0
|
|
}
|
|
|
|
var test3: Int
|
|
field = 0
|
|
get
|
|
set
|
|
|
|
var test4: Int
|
|
field = 1
|
|
get
|
|
set(value: Int) {
|
|
<this>.#test4 = value
|
|
}
|
|
|
|
var test5: Int
|
|
field = 1
|
|
get
|
|
private set
|
|
|
|
val test6: Int
|
|
field = 1
|
|
get
|
|
|
|
val test7: Int /* by */
|
|
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
|
return 42
|
|
}
|
|
)
|
|
get(): Int {
|
|
return <this>.#test7$delegate.getValue<Int>(thisRef = <this>, property = C::test7)
|
|
}
|
|
|
|
var test8: Int /* by */
|
|
field = hashMapOf<String, Int>()
|
|
get(): Int {
|
|
return <this>.#test8$delegate.getValue<Int, Int>(thisRef = <this>, property = C::test8)
|
|
}
|
|
set(<set-?>: Int) {
|
|
<this>.#test8$delegate.setValue<Int>(thisRef = <this>, property = C::test8, value = <set-?>)
|
|
}
|
|
|
|
}
|
|
|