Skip to content

Commit 4be9a60

Browse files
committed
Sema: Don't introduce ErrorType when an associated type is witnessed by an Objective-C generic parameter
In general it's fine to emit a diagnostic but leave the conformance valid here, we're not going to go on to emit code, and an ErrorType here causes other diagnostics to be not be emitted in a test due to minor validation order perturbations.
1 parent a9b276c commit 4be9a60

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1910,8 +1910,7 @@ void ConformanceChecker::recordTypeWitness(AssociatedTypeDecl *assocType,
19101910

19111911
assert(!type->hasArchetype() && "Got a contextual type here?");
19121912

1913-
if (checkObjCTypeErasedGenerics(assocType, type, typeDecl))
1914-
type = ErrorType::get(type);
1913+
checkObjCTypeErasedGenerics(assocType, type, typeDecl);
19151914

19161915
if (typeDecl) {
19171916
// Check access.

0 commit comments

Comments
 (0)