diff --git a/lib/AST/SubstitutionMap.cpp b/lib/AST/SubstitutionMap.cpp index c5588a9767b15..8204ab20f5ad9 100644 --- a/lib/AST/SubstitutionMap.cpp +++ b/lib/AST/SubstitutionMap.cpp @@ -283,20 +283,6 @@ SubstitutionMap::lookupConformance(CanType type, ProtocolDecl *proto) const { // For each remaining step, project an associated conformance. while (iter != path.end()) { - // FIXME: Remove this hack. It is unsound, because we may not have diagnosed - // anything but still end up with an ErrorType in the AST. - if (conformance.isConcrete()) { - auto concrete = conformance.getConcrete(); - if (auto normal = dyn_cast(concrete->getRootConformance())) { - if (!normal->hasComputedAssociatedConformances()) { - if (proto->getASTContext().evaluator.hasActiveRequest( - ResolveTypeWitnessesRequest{normal})) { - return ProtocolConformanceRef::forInvalid(); - } - } - } - } - const auto step = *iter++; conformance = conformance.getAssociatedConformance(step.first, step.second); } diff --git a/lib/AST/TypeSubstitution.cpp b/lib/AST/TypeSubstitution.cpp index 2c04ea3de0517..ab8d1ddfeaf5c 100644 --- a/lib/AST/TypeSubstitution.cpp +++ b/lib/AST/TypeSubstitution.cpp @@ -358,7 +358,7 @@ class TypeSubstituter : public TypeTransform { std::optional transformLocalArchetypeType(LocalArchetypeType *local, TypePosition pos); - // SubstitutionMap transformSubstitutionMap(SubstitutionMap subs); + SubstitutionMap transformSubstitutionMap(SubstitutionMap subs); CanType transformSILField(CanType fieldTy, TypePosition pos); }; @@ -474,13 +474,10 @@ Type TypeSubstituter::transformDependentMemberType(DependentMemberType *dependen return result; } -// FIXME: This exposes a scalability issue; see test/SILGen/opaque_result_type_slow.swift. -/* SubstitutionMap TypeSubstituter::transformSubstitutionMap(SubstitutionMap subs) { // FIXME: Take level into account? Move level down into IFS? return subs.subst(IFS); } -*/ CanType TypeSubstituter::transformSILField(CanType fieldTy, TypePosition pos) { // Type substitution does not walk into the SILBoxType's field types, because diff --git a/validation-test/compiler_crashers_2/174f557922f5c3cc.swift b/validation-test/compiler_crashers_2_fixed/174f557922f5c3cc.swift similarity index 89% rename from validation-test/compiler_crashers_2/174f557922f5c3cc.swift rename to validation-test/compiler_crashers_2_fixed/174f557922f5c3cc.swift index bb3d379def568..72c539f629e14 100644 --- a/validation-test/compiler_crashers_2/174f557922f5c3cc.swift +++ b/validation-test/compiler_crashers_2_fixed/174f557922f5c3cc.swift @@ -1,5 +1,5 @@ // {"kind":"typecheck","original":"2fdf1565","signature":"(anonymous namespace)::TypeSubstituter::transformDependentMemberType(swift::DependentMemberType*, swift::TypePosition)","stackOverflow":true} -// RUN: not --crash %target-swift-frontend -typecheck %s +// RUN: not %target-swift-frontend -typecheck %s protocol a { typealias b = c associatedtype d: b