File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,9 @@ bool RequirementMachine::isCanonicalTypeInContext(Type type) const {
265
265
explicit Walker (const RequirementMachine &self) : Self(self) {}
266
266
267
267
Action walkToTypePre (Type component) override {
268
+ if (!component->hasTypeParameter ())
269
+ return Action::SkipChildren;
270
+
268
271
if (!component->isTypeParameter ())
269
272
return Action::Continue;
270
273
@@ -305,6 +308,9 @@ Type RequirementMachine::getCanonicalTypeInContext(
305
308
TypeArrayView<GenericTypeParamType> genericParams) const {
306
309
307
310
return type.transformRec ([&](Type t) -> Optional<Type> {
311
+ if (!t->hasTypeParameter ())
312
+ return t;
313
+
308
314
if (!t->isTypeParameter ())
309
315
return None;
310
316
You can’t perform that action at this time.
0 commit comments