Skip to content

Commit b39dfdf

Browse files
committed
[AST] Upgrade interface type assertions
1 parent 3e981b7 commit b39dfdf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/AST/TypeCheckRequests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,10 +1222,10 @@ std::optional<Type> InterfaceTypeRequest::getCachedResult() const {
12221222
void InterfaceTypeRequest::cacheResult(Type type) const {
12231223
auto *decl = std::get<0>(getStorage());
12241224
if (type) {
1225-
assert(!type->hasTypeVariable() && "Type variable in interface type");
1226-
assert(!type->is<InOutType>() && "Interface type must be materializable");
1227-
assert(!type->hasPrimaryArchetype() && "Archetype in interface type");
1228-
assert(decl->getDeclContext()->isLocalContext() || !type->hasLocalArchetype() &&
1225+
ASSERT(!type->hasTypeVariable() && "Type variable in interface type");
1226+
ASSERT(!type->is<InOutType>() && "Interface type must be materializable");
1227+
ASSERT(!type->hasPrimaryArchetype() && "Archetype in interface type");
1228+
ASSERT(decl->getDeclContext()->isLocalContext() || !type->hasLocalArchetype() &&
12291229
"Local archetype in interface type of non-local declaration");
12301230
}
12311231
decl->TypeAndAccess.setPointer(type);

0 commit comments

Comments
 (0)