Skip to content

Commit 672135b

Browse files
committed
AST: Remove old hack that appears to be obsolete
The FIXME was originally introduced in 2017 by commit c0805a2. Good riddance!
1 parent 9fe4383 commit 672135b

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

lib/AST/SubstitutionMap.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,20 +283,6 @@ SubstitutionMap::lookupConformance(CanType type, ProtocolDecl *proto) const {
283283

284284
// For each remaining step, project an associated conformance.
285285
while (iter != path.end()) {
286-
// FIXME: Remove this hack. It is unsound, because we may not have diagnosed
287-
// anything but still end up with an ErrorType in the AST.
288-
if (conformance.isConcrete()) {
289-
auto concrete = conformance.getConcrete();
290-
if (auto normal = dyn_cast<NormalProtocolConformance>(concrete->getRootConformance())) {
291-
if (!normal->hasComputedAssociatedConformances()) {
292-
if (proto->getASTContext().evaluator.hasActiveRequest(
293-
ResolveTypeWitnessesRequest{normal})) {
294-
return ProtocolConformanceRef::forInvalid();
295-
}
296-
}
297-
}
298-
}
299-
300286
const auto step = *iter++;
301287
conformance = conformance.getAssociatedConformance(step.first, step.second);
302288
}

validation-test/compiler_crashers_2/174f557922f5c3cc.swift renamed to validation-test/compiler_crashers_2_fixed/174f557922f5c3cc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// {"kind":"typecheck","original":"2fdf1565","signature":"(anonymous namespace)::TypeSubstituter::transformDependentMemberType(swift::DependentMemberType*, swift::TypePosition)","stackOverflow":true}
2-
// RUN: not --crash %target-swift-frontend -typecheck %s
2+
// RUN: not %target-swift-frontend -typecheck %s
33
protocol a {
44
typealias b = c
55
associatedtype d: b

0 commit comments

Comments
 (0)