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 @@ -1979,6 +1979,16 @@ namespace {
1979
1979
1980
1980
MetadataResponse visitExistentialType (CanExistentialType type,
1981
1981
DynamicMetadataRequest request) {
1982
+ if (auto *PCT =
1983
+ type->getConstraintType ()->getAs <ProtocolCompositionType>()) {
1984
+ auto constraintTy = PCT->withoutMarkerProtocols ();
1985
+ if (constraintTy->getClassOrBoundGenericClass ()) {
1986
+ auto response = IGF.emitTypeMetadataRef (
1987
+ constraintTy->getCanonicalType (), request);
1988
+ return setLocal (type, response);
1989
+ }
1990
+ }
1991
+
1982
1992
if (auto metadata = tryGetLocal (type, request))
1983
1993
return metadata;
1984
1994
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