Assert no lookup in meaningless scope created by commonSupertype()
This commit is contained in:
@@ -223,14 +223,17 @@ public class CommonSupertypes {
|
||||
nullable |= type.isMarkedNullable();
|
||||
}
|
||||
|
||||
JetScope newScope = JetScope.Empty.INSTANCE$;
|
||||
ClassifierDescriptor declarationDescriptor = constructor.getDeclarationDescriptor();
|
||||
JetScope newScope;
|
||||
if (declarationDescriptor instanceof ClassDescriptor) {
|
||||
newScope = ((ClassDescriptor) declarationDescriptor).getMemberScope(newProjections);
|
||||
}
|
||||
else if (declarationDescriptor instanceof TypeParameterDescriptor) {
|
||||
newScope = ((TypeParameterDescriptor) declarationDescriptor).getUpperBoundsAsType().getMemberScope();
|
||||
}
|
||||
else {
|
||||
newScope = ErrorUtils.createErrorScope("A scope for common supertype which is not a normal classifier", true);
|
||||
}
|
||||
return new JetTypeImpl(Annotations.EMPTY, constructor, nullable, newProjections, newScope);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user