Skip to content

Commit 3432a1f

Browse files
committed
RequirementMachine: Don't filter out ErrorType as aggressively
1 parent e3ab64a commit 3432a1f

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

lib/AST/RequirementMachine/RequirementBuilder.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ void ConnectedComponent::buildRequirements(Type subjectType,
8686
subjectType = constraintType;
8787
}
8888

89-
// For compatibility with the old GenericSignatureBuilder, drop requirements
90-
// containing ErrorTypes.
91-
} else if (!ConcreteType->hasError()) {
89+
} else {
9290
// If there are multiple protocol typealiases in the connected component,
9391
// lower them all to a series of identical concrete-type aliases.
9492
for (auto name : Aliases) {
@@ -190,11 +188,6 @@ void RequirementBuilder::addRequirementRules(ArrayRef<unsigned> rules) {
190188
return;
191189
}
192190

193-
// Requirements containing error types originate from invalid code
194-
// and should not appear in the generic signature.
195-
if (prop->getConcreteType()->hasError())
196-
return;
197-
198191
Type superclassType = Map.getTypeFromSubstitutionSchema(
199192
prop->getConcreteType(),
200193
prop->getSubstitutions(),
@@ -216,11 +209,6 @@ void RequirementBuilder::addRequirementRules(ArrayRef<unsigned> rules) {
216209
return;
217210
}
218211

219-
// Requirements containing error types originate from invalid code
220-
// and should not appear in the generic signature.
221-
if (prop->getConcreteType()->hasError())
222-
return;
223-
224212
Type concreteType = Map.getTypeFromSubstitutionSchema(
225213
prop->getConcreteType(),
226214
prop->getSubstitutions(),
@@ -291,11 +279,6 @@ void RequirementBuilder::addTypeAliasRules(ArrayRef<unsigned> rules) {
291279
continue;
292280
}
293281

294-
// Requirements containing error types originate from invalid code
295-
// and should not appear in the generic signature.
296-
if (prop->getConcreteType()->hasError())
297-
continue;
298-
299282
Type concreteType = Map.getTypeFromSubstitutionSchema(
300283
prop->getConcreteType(),
301284
prop->getSubstitutions(),

0 commit comments

Comments
 (0)