FIR u/s scope: choose most specific intersection member for override check
Before this commit we took just first intersection member for this check. However it's quite bad, because we were dependent on supertype order. Choosing the most specific member looks more consistent here. #KT-50969 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
1137e61fc8
commit
05d65275bf
+1
-1
@@ -130,7 +130,7 @@ abstract class AbstractFirUseSiteMemberScope(
|
||||
*
|
||||
* TODO: is it enough to check only one function?
|
||||
*/
|
||||
firstMember
|
||||
mostSpecific
|
||||
} else {
|
||||
chosenSymbol
|
||||
}
|
||||
|
||||
+2
-2
@@ -73,8 +73,8 @@ class FirTypeIntersectionScopeContext(
|
||||
).member as D
|
||||
}
|
||||
|
||||
val firstMember: D
|
||||
get() = context.extractedOverrides.first().member
|
||||
val mostSpecific: D
|
||||
get() = context.mostSpecific
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user