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
1834
1834
if (nom->getDecl () != substNom->getDecl ())
1835
1835
return CanType ();
1836
1836
1837
- if (nom->getDecl ()->isInvalid ())
1838
- return CanType ();
1839
-
1840
1837
// Same decl should always either have or not have a parent.
1841
1838
assert ((bool )nom->getParent () == (bool )substNom->getParent ());
1842
1839
@@ -2078,8 +2075,6 @@ class IsBindableVisitor
2078
2075
return CanType ();
2079
2076
2080
2077
auto *decl = bgt->getDecl ();
2081
- if (decl->isInvalid ())
2082
- return CanType ();
2083
2078
2084
2079
auto *moduleDecl = decl->getParentModule ();
2085
2080
auto origSubMap = bgt->getContextSubstitutionMap (
@@ -2139,6 +2134,12 @@ class IsBindableVisitor
2139
2134
if (req.getKind () != RequirementKind::Conformance) continue ;
2140
2135
2141
2136
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
+
2142
2143
auto *proto = req.getProtocolDecl ();
2143
2144
auto origConf = origSubMap.lookupConformance (canTy, proto);
2144
2145
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
2
2
3
3
public protocol Prot {
4
4
associatedtype T
You can’t perform that action at this time.
0 commit comments