File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -1989,6 +1989,16 @@ namespace {
1989
1989
1990
1990
MetadataResponse visitExistentialType (CanExistentialType type,
1991
1991
DynamicMetadataRequest request) {
1992
+ if (auto *PCT =
1993
+ type->getConstraintType ()->getAs <ProtocolCompositionType>()) {
1994
+ auto constraintTy = PCT->withoutMarkerProtocols ();
1995
+ if (constraintTy->getClassOrBoundGenericClass ()) {
1996
+ auto response = IGF.emitTypeMetadataRef (
1997
+ constraintTy->getCanonicalType (), request);
1998
+ return setLocal (type, response);
1999
+ }
2000
+ }
2001
+
1992
2002
if (auto metadata = tryGetLocal (type, request))
1993
2003
return metadata;
1994
2004
Original file line number Diff line number Diff line change 27
27
print ( v1 == v2)
28
28
// CHECK: true
29
29
}
30
+
31
+ @_marker
32
+ protocol Marker {
33
+ }
34
+
35
+ do {
36
+ print ( G< any ( C & Sendable) > . self )
37
+ // CHECK: G<C>
38
+
39
+ class D < T> {
40
+ }
41
+
42
+ print ( ( D< Int> & Sendable) . self)
43
+ // CHECK: D<Int>
44
+
45
+ print ( ( D< C & Marker> & Sendable) . self)
46
+ // CHECK: D<C>
47
+
48
+ print ( ( any Marker & Sendable ) . self)
49
+ // CHECK: Any
50
+
51
+ print ( ( AnyObject & Sendable & Marker) . self)
52
+ // CHECK: AnyObject
53
+ }
You can’t perform that action at this time.
0 commit comments