@@ -47,17 +47,61 @@ public class Class1 {
47
47
public var index1 : Struct1 < UInt32 > { . init( rawValue: 123 ) }
48
48
}
49
49
50
+ public struct GlyphIndex < IntType: FixedWidthInteger & UnsignedInteger > {
51
+ private var value : IntType
52
+
53
+ init ( value: IntType ) {
54
+ self . value = value
55
+ }
56
+ }
57
+
58
+ public struct QueryResult < GlyphIndexInt: UnsignedInteger & FixedWidthInteger > {
59
+ public var glyphIDs : [ GlyphIndex < GlyphIndexInt > ]
60
+ }
61
+
62
+ public func makeQueryResult( ) -> QueryResult < UInt32 > { . init( glyphIDs: [ ] ) }
63
+
50
64
// CHECK: supported
51
65
52
66
// CHECK: class SWIFT_SYMBOL("s:5Decls6Class1C") Class1 : public swift::_impl::RefCountedClass {
53
67
// CHECK: 'index1' cannot be printed
54
68
69
+ // CHECK: namespace Decls SWIFT_PRIVATE_ATTR SWIFT_SYMBOL_MODULE("Decls") {
70
+ // CHECK: namespace Decls SWIFT_PRIVATE_ATTR SWIFT_SYMBOL_MODULE("Decls") {
71
+ // CHECK: SWIFT_INLINE_THUNK void supportedFunc(const T_0_0& x) noexcept SWIFT_SYMBOL("s:5Decls13supportedFuncyyxlF") {
72
+
73
+ // CHECK: template<class T_0_0>
74
+ // CHECK-NEXT: #ifdef __cpp_concepts
75
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0>
76
+ // CHECK-NEXT: #endif // __cpp_concepts
77
+ // CHECK-NEXT: class GlyphIndex { } SWIFT_UNAVAILABLE_MSG("generic requirements for generic struct 'GlyphIndex' can not yet be represented in C++");
78
+
79
+ // CHECK: class Proto { } SWIFT_UNAVAILABLE_MSG("protocol 'Proto' can not yet be represented in C++");
80
+
81
+ // CHECK: template<class T_0_0>
82
+ // CHECK-NEXT: #ifdef __cpp_concepts
83
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0>
84
+ // CHECK-NEXT: #endif // __cpp_concepts
85
+ // CHECK-NEXT: class QueryResult { } SWIFT_UNAVAILABLE_MSG("generic requirements for generic struct 'QueryResult' can not yet be represented in C++");
86
+
55
87
// CHECK: class Struct1 { } SWIFT_UNAVAILABLE_MSG("generic requirements for generic struct 'Struct1' can not yet be represented in C++");
56
88
57
89
// CHECK: // Unavailable in C++: Swift global function 'unsupportedFunc(_:)'.
58
90
59
- // CHECK: class unsupportedGenericClass { } SWIFT_UNAVAILABLE_MSG("generic generic class 'unsupportedGenericClass' can not yet be exposed to C++");
91
+ // CHECK: template<class T_0_0>
92
+ // CHECK-NEXT: #ifdef __cpp_concepts
93
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0>
94
+ // CHECK-NEXT: #endif // __cpp_concepts
95
+ // CHECK-NEXT: class unsupportedGenericClass { } SWIFT_UNAVAILABLE_MSG("generic generic class 'unsupportedGenericClass' can not yet be exposed to C++");
60
96
// CHECK-EMPTY:
97
+ // CHECK-NEXT: template<class T_0_0>
98
+ // CHECK-NEXT: #ifdef __cpp_concepts
99
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0>
100
+ // CHECK-NEXT: #endif // __cpp_concepts
61
101
// CHECK-NEXT: class unsupportedGenericEnum { } SWIFT_UNAVAILABLE_MSG("generic requirements for generic enum 'unsupportedGenericEnum' can not yet be represented in C++");
62
102
// CHECK-EMPTY:
103
+ // CHECK-NEXT: template<class T_0_0>
104
+ // CHECK-NEXT: #ifdef __cpp_concepts
105
+ // CHECK-NEXT: requires swift::isUsableInGenericContext<T_0_0>
106
+ // CHECK-NEXT: #endif // __cpp_concepts
63
107
// CHECK-NEXT: class unsupportedGenericStruct { } SWIFT_UNAVAILABLE_MSG("generic requirements for generic struct 'unsupportedGenericStruct' can not yet be represented in C++");
0 commit comments