Skip to content

Commit 08a9211

Browse files
committed
Assert that we don't produce a SILFunction with a type with opened
type parameters.
1 parent 8421669 commit 08a9211

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SIL/IR/SILFunction.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ void SILFunction::init(
186186
IsExactSelfClass_t isExactSelfClass, IsDistributed_t isDistributed,
187187
IsRuntimeAccessible_t isRuntimeAccessible) {
188188
setName(Name);
189+
190+
assert(!LoweredType->hasTypeParameter() &&
191+
"function type has open type parameters");
192+
189193
this->LoweredType = LoweredType;
190194
this->GenericEnv = genericEnv;
191195
this->SpecializationInfo = nullptr;

0 commit comments

Comments
 (0)