File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
validation-test/compiler_crashers_2_fixed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -1834,9 +1834,6 @@ class IsBindableVisitor
18341834 if (nom->getDecl () != substNom->getDecl ())
18351835 return CanType ();
18361836
1837- if (nom->getDecl ()->isInvalid ())
1838- return CanType ();
1839-
18401837 // Same decl should always either have or not have a parent.
18411838 assert ((bool )nom->getParent () == (bool )substNom->getParent ());
18421839
@@ -2078,8 +2075,6 @@ class IsBindableVisitor
20782075 return CanType ();
20792076
20802077 auto *decl = bgt->getDecl ();
2081- if (decl->isInvalid ())
2082- return CanType ();
20832078
20842079 auto *moduleDecl = decl->getParentModule ();
20852080 auto origSubMap = bgt->getContextSubstitutionMap (
@@ -2139,6 +2134,12 @@ class IsBindableVisitor
21392134 if (req.getKind () != RequirementKind::Conformance) continue ;
21402135
21412136 auto canTy = req.getFirstType ()->getCanonicalType ();
2137+
2138+ // If the substituted type is an interface type, we can't verify the
2139+ // generic requirements.
2140+ if (canTy.subst (substSubMap)->isTypeParameter ())
2141+ continue ;
2142+
21422143 auto *proto = req.getProtocolDecl ();
21432144 auto origConf = origSubMap.lookupConformance (canTy, proto);
21442145 auto substConf = substSubMap.lookupConformance (canTy, proto);
Original file line number Diff line number Diff line change 1- // RUN: not --crash %target-swift-frontend -emit-ir %s
1+ // RUN: %target-swift-frontend -emit-ir %s
22
33public protocol Prot {
44 associatedtype T
You can’t perform that action at this time.
0 commit comments