[FIR] Properly collect overriddens for method enhancement
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`
This commit is contained in:
Vendored
+1
-1
@@ -6,7 +6,7 @@ public abstract interface Kt3302 : R|kotlin/Any| {
|
||||
|
||||
}
|
||||
public abstract interface BasicBSONObject : R|test/Kt3302.LinkedHashMap<ft<kotlin/String, kotlin/String?>, ft<kotlin/Any, kotlin/Any?>>|, R|test/Kt3302.BSONObject| {
|
||||
@R|java/lang/Override|() public abstract fun put(key: R|ft<kotlin/String, kotlin/String?>|, value: R|ft<kotlin/Any, kotlin/Any?>|): R|ft<kotlin/Any, kotlin/Any?>|
|
||||
@R|java/lang/Override|() public abstract fun put(key: R|@EnhancedNullability kotlin/String|, value: R|@EnhancedNullability kotlin/Any|): R|ft<kotlin/Any, kotlin/Any?>|
|
||||
|
||||
}
|
||||
public abstract interface LinkedHashMap<K : R|ft<kotlin/Any, kotlin/Any?>|, V : R|ft<kotlin/Any, kotlin/Any?>|> : R|kotlin/Any| {
|
||||
|
||||
Reference in New Issue
Block a user