Skip to content

Commit 3b6ee7c

Browse files
committed
RequirementMachine: Add an assert
1 parent 5cdc9a6 commit 3b6ee7c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/AST/RequirementMachine/Symbol.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ Symbol Symbol::forLayout(LayoutConstraint layout,
366366
/// Creates a superclass symbol, representing a superclass constraint.
367367
Symbol Symbol::forSuperclass(CanType type, ArrayRef<Term> substitutions,
368368
RewriteContext &ctx) {
369+
ASSERT(type.getClassOrBoundGenericClass() != nullptr);
370+
369371
llvm::FoldingSetNodeID id;
370372
id.AddInteger(unsigned(Kind::Superclass));
371373
id.AddPointer(type.getPointer());

0 commit comments

Comments
 (0)