@@ -267,28 +267,24 @@ checkRequirementsImpl(ArrayRef<Requirement> requirements,
267
267
while (!worklist.empty ()) {
268
268
auto req = worklist.pop_back_val ();
269
269
270
- // Check preconditions.
271
- #ifndef NDEBUG
272
- {
270
+ // Check preconditions.
273
271
auto firstType = req.getFirstType ();
274
- assert ((allowTypeParameters || !firstType->hasTypeParameter ())
272
+ ASSERT ((allowTypeParameters || !firstType->hasTypeParameter ())
275
273
&& " must take a contextual type. if you really are ok with an "
276
274
" indefinite answer (and usually YOU ARE NOT), then consider whether "
277
275
" you really, definitely are ok with an indefinite answer, and "
278
276
" use `checkRequirementsWithoutContext` instead" );
279
- assert (!firstType->hasTypeVariable ());
277
+ ASSERT (!firstType->hasTypeVariable ());
280
278
281
279
if (req.getKind () != RequirementKind::Layout) {
282
280
auto secondType = req.getSecondType ();
283
- assert ((allowTypeParameters || !secondType->hasTypeParameter ())
281
+ ASSERT ((allowTypeParameters || !secondType->hasTypeParameter ())
284
282
&& " must take a contextual type. if you really are ok with an "
285
283
" indefinite answer (and usually YOU ARE NOT), then consider whether "
286
284
" you really, definitely are ok with an indefinite answer, and "
287
285
" use `checkRequirementsWithoutContext` instead" );
288
- assert (!secondType->hasTypeVariable ());
286
+ ASSERT (!secondType->hasTypeVariable ());
289
287
}
290
- }
291
- #endif
292
288
293
289
switch (req.checkRequirement (worklist, /* allowMissing=*/ true )) {
294
290
case CheckRequirementResult::Success:
0 commit comments