Skip to content

Commit 6279849

Browse files
committed
Revert "[Sema] Handle PlaceholderTypes in associated type inference"
This reverts commit aa9aa58.
1 parent 46df852 commit 6279849

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

include/swift/AST/TypeMatcher.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ class TypeMatcher {
117117
#define SINGLETON_TYPE(SHORT_ID, ID) TRIVIAL_CASE(ID##Type)
118118
#include "swift/AST/TypeNodes.def"
119119

120-
bool visitPlaceholderType(CanPlaceholderType firstType, Type secondType,
121-
Type sugaredFirstType) {
122-
// Placeholder types never match.
123-
return mismatch(firstType.getPointer(), secondType, sugaredFirstType);
124-
}
125-
126120
bool visitUnresolvedType(CanUnresolvedType firstType, Type secondType,
127121
Type sugaredFirstType) {
128122
// Unresolved types never match.

lib/Sema/AssociatedTypeInference.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,9 +2317,9 @@ AssociatedTypeInference::getPotentialTypeWitnessesByMatchingTypes(ValueDecl *req
23172317
/// Deduce associated types from dependent member types in the witness.
23182318
bool mismatch(DependentMemberType *firstDepMember,
23192319
TypeBase *secondType, Type sugaredFirstType) {
2320-
// If the second type is an error or placeholder, don't look at it
2321-
// further, but proceed to find other matches.
2322-
if (secondType->hasError() || secondType->hasPlaceholder())
2320+
// If the second type is an error, don't look at it further, but proceed
2321+
// to find other matches.
2322+
if (secondType->hasError())
23232323
return true;
23242324

23252325
// If the second type is a generic parameter of the witness, the match

0 commit comments

Comments
 (0)