Skip to content

Commit 6a4f7ff

Browse files
committed
AST: Allow local archetypes in interface types of local declarations
1 parent 8d30645 commit 6a4f7ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/AST/TypeCheckRequests.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,9 @@ void InterfaceTypeRequest::cacheResult(Type type) const {
10741074
if (type) {
10751075
assert(!type->hasTypeVariable() && "Type variable in interface type");
10761076
assert(!type->is<InOutType>() && "Interface type must be materializable");
1077-
assert(!type->hasArchetype() && "Archetype in interface type");
1077+
assert(!type->hasPrimaryArchetype() && "Archetype in interface type");
1078+
assert(decl->getDeclContext()->isLocalContext() || !type->hasLocalArchetype() &&
1079+
"Local archetype in interface type of non-local declaration");
10781080
}
10791081
decl->TypeAndAccess.setPointer(type);
10801082
}

0 commit comments

Comments
 (0)