FIR. Shadow classifiers from super-type scopes
This commit is contained in:
+8
-2
@@ -197,8 +197,14 @@ abstract class AbstractFirUseSiteMemberScope(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun processClassifiersByNameWithSubstitution(name: Name, processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit) {
|
override fun processClassifiersByNameWithSubstitution(name: Name, processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit) {
|
||||||
declaredMemberScope.processClassifiersByNameWithSubstitution(name, processor)
|
var shadowed = false
|
||||||
supertypeScopeContext.processClassifiersByNameWithSubstitution(name, absentClassifiersFromSupertypes, processor)
|
declaredMemberScope.processClassifiersByNameWithSubstitution(name) { classifier, substitutor ->
|
||||||
|
shadowed = true
|
||||||
|
processor(classifier, substitutor)
|
||||||
|
}
|
||||||
|
if (!shadowed) {
|
||||||
|
supertypeScopeContext.processClassifiersByNameWithSubstitution(name, absentClassifiersFromSupertypes, processor)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) {
|
override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user