mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
getInterfaceType() always returns a type (#28210)
getInterfaceType() always returns a type
This commit is contained in:
@@ -3431,11 +3431,7 @@ Type TypeDecl::getDeclaredInterfaceType() const {
|
||||
selfTy, const_cast<AssociatedTypeDecl *>(ATD));
|
||||
}
|
||||
|
||||
Type interfaceType = getInterfaceType();
|
||||
if (!interfaceType)
|
||||
return ErrorType::get(getASTContext());
|
||||
|
||||
return interfaceType->getMetatypeInstanceType();
|
||||
return getInterfaceType()->getMetatypeInstanceType();
|
||||
}
|
||||
|
||||
int TypeDecl::compare(const TypeDecl *type1, const TypeDecl *type2) {
|
||||
@@ -4776,10 +4772,6 @@ ProtocolDecl::findProtocolSelfReferences(const ValueDecl *value,
|
||||
|
||||
auto type = value->getInterfaceType();
|
||||
|
||||
// FIXME: Deal with broken recursion.
|
||||
if (!type)
|
||||
return SelfReferenceKind::None();
|
||||
|
||||
// Skip invalid declarations.
|
||||
if (type->hasError())
|
||||
return SelfReferenceKind::None();
|
||||
|
||||
Reference in New Issue
Block a user