Skip to content

Commit 1c18541

Browse files
committed
[AST] Simplify Type::isBareErrorType
Missed this when I changed `ErrorType::get` to flatten nested ErrorTypes on construction, we no longer need to check for the recursive case here.
1 parent a83ea3c commit 1c18541

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

include/swift/AST/Types.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8132,13 +8132,7 @@ inline ASTContext &TypeBase::getASTContext() const {
81328132

81338133
inline bool TypeBase::isBareErrorType() const {
81348134
auto *errTy = dyn_cast<ErrorType>(this);
8135-
if (!errTy)
8136-
return false;
8137-
8138-
// FIXME: We shouldn't need to check for a recursive bare error type, we can
8139-
// remove this once we flatten them.
8140-
auto originalTy = errTy->getOriginalType();
8141-
return !originalTy || originalTy->isBareErrorType();
8135+
return errTy && !errTy->getOriginalType();
81428136
}
81438137

81448138
// TODO: This will become redundant once InOutType is removed.

0 commit comments

Comments
 (0)