Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions lib/AST/SubstitutionMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<NormalProtocolConformance>(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);
}
Expand Down
5 changes: 1 addition & 4 deletions lib/AST/TypeSubstitution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class TypeSubstituter : public TypeTransform<TypeSubstituter> {
std::optional<Type> transformLocalArchetypeType(LocalArchetypeType *local,
TypePosition pos);

// SubstitutionMap transformSubstitutionMap(SubstitutionMap subs);
SubstitutionMap transformSubstitutionMap(SubstitutionMap subs);

CanType transformSILField(CanType fieldTy, TypePosition pos);
};
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down