Skip to content

Commit aeda34e

Browse files
authored
Merge pull request swiftlang#39328 from slavapestov/is-bindable-visitor-fix
AST: Remove bogus check from IsBindableVisitor::handleGenericNominalType()
2 parents ea68a8b + 933f360 commit aeda34e

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

lib/AST/Type.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,12 +2025,6 @@ class IsBindableVisitor
20252025
auto substConf = substSubMap.lookupConformance(canTy, proto);
20262026

20272027
if (origConf.isConcrete()) {
2028-
// A generic argument may inherit a concrete conformance from a class
2029-
// constraint, which could still be bound to a type parameter we don't
2030-
// know more about.
2031-
if (origConf.getConcrete()->getType()->is<ArchetypeType>())
2032-
continue;
2033-
20342028
if (!substConf.isConcrete())
20352029
return CanType();
20362030
if (origConf.getConcrete()->getRootConformance()
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %target-swift-emit-silgen %s
2+
3+
public protocol Q {}
4+
5+
public protocol P {}
6+
public class C : P {}
7+
8+
public class G<T : P> {}
9+
10+
extension Q where Self : C {
11+
public func foo(_: (G<Self>) -> ()) {}
12+
}

0 commit comments

Comments
 (0)