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
253253
254254 while (!worklist.empty ()) {
255255 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+
256272 switch (req.checkRequirement (worklist, /* allowMissing=*/ true )) {
257273 case CheckRequirementResult::Success:
258274 case CheckRequirementResult::ConditionalConformance:
You can’t perform that action at this time.
0 commit comments