File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,22 @@ CheckRequirementsResult swift::checkRequirements(ArrayRef<Requirement> requireme
253
253
254
254
while (!worklist.empty ()) {
255
255
auto req = worklist.pop_back_val ();
256
+
257
+ // Check preconditions.
258
+ #ifndef NDEBUG
259
+ {
260
+ auto firstType = req.getFirstType ();
261
+ assert (!firstType->hasTypeParameter ());
262
+ assert (!firstType->hasTypeVariable ());
263
+
264
+ if (req.getKind () != RequirementKind::Layout) {
265
+ auto secondType = req.getSecondType ();
266
+ assert (!secondType->hasTypeParameter ());
267
+ assert (!secondType->hasTypeVariable ());
268
+ }
269
+ }
270
+ #endif
271
+
256
272
switch (req.checkRequirement (worklist, /* allowMissing=*/ true )) {
257
273
case CheckRequirementResult::Success:
258
274
case CheckRequirementResult::ConditionalConformance:
You can’t perform that action at this time.
0 commit comments