@@ -14,15 +14,15 @@ import Testing
1414 source: """
1515 @JS public func identity<T>(_ value: T) -> T { value }
1616 """ ,
17- contains: " Generic parameter 'T' must be constrained to '_BridgedSwiftGenericBridgeable ' "
17+ contains: " Generic parameter 'T' must be constrained to 'BridgedSwiftGenericBridgeable ' "
1818 )
1919 }
2020
2121 @Test
2222 func genericWhereClauseUnsupported( ) {
2323 expectDiagnostic (
2424 source: """
25- @JS public func identity<T: _BridgedSwiftGenericBridgeable >(_ value: T) -> T where T: Sendable { value }
25+ @JS public func identity<T: BridgedSwiftGenericBridgeable >(_ value: T) -> T where T: Sendable { value }
2626 """ ,
2727 contains: " 'where' clauses are not supported "
2828 )
@@ -32,7 +32,7 @@ import Testing
3232 func asyncGenericExportUnsupported( ) {
3333 expectDiagnostic (
3434 source: """
35- @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: T) async -> T { v }
35+ @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: T) async -> T { v }
3636 """ ,
3737 contains: " Generic @JS functions cannot be 'async' yet. "
3838 )
@@ -42,17 +42,17 @@ import Testing
4242 func throwsGenericExportUnsupported( ) {
4343 expectDiagnostic (
4444 source: """
45- @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: T) throws(JSException) -> T { v }
45+ @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: T) throws(JSException) -> T { v }
4646 """ ,
4747 contains: " Generic @JS functions cannot be 'throws' yet. "
4848 )
4949 }
5050
5151 @Test ( arguments: [
52- ( " [[T]] " , " @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: [[T]]) {} " ) ,
53- ( " [T?] " , " @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: [T?]) {} " ) ,
54- ( " T?? " , " @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: T??) {} " ) ,
55- ( " [Int: T] " , " @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: [Int: T]) {} " ) ,
52+ ( " [[T]] " , " @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: [[T]]) {} " ) ,
53+ ( " [T?] " , " @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: [T?]) {} " ) ,
54+ ( " T?? " , " @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: T??) {} " ) ,
55+ ( " [Int: T] " , " @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: [Int: T]) {} " ) ,
5656 ] )
5757 func unsupportedGenericWrapperFormsInParameter( label: String , source: String ) {
5858 expectDiagnostic (
@@ -62,10 +62,10 @@ import Testing
6262 }
6363
6464 @Test ( arguments: [
65- ( " [[T]] " , " @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: T) -> [[T]] { [[v]] } " ) ,
66- ( " [T?] " , " @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: T) -> [T?] { [v] } " ) ,
67- ( " T?? " , " @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: T) -> T?? { v } " ) ,
68- ( " [Int: T] " , " @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: T) -> [Int: T] { [0: v] } " ) ,
65+ ( " [[T]] " , " @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: T) -> [[T]] { [[v]] } " ) ,
66+ ( " [T?] " , " @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: T) -> [T?] { [v] } " ) ,
67+ ( " T?? " , " @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: T) -> T?? { v } " ) ,
68+ ( " [Int: T] " , " @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: T) -> [Int: T] { [0: v] } " ) ,
6969 ] )
7070 func unsupportedGenericWrapperFormsInReturn( label: String , source: String ) {
7171 expectDiagnostic (
@@ -78,7 +78,7 @@ import Testing
7878 func fullyUnusedGenericParameterRejected( ) {
7979 expectDiagnostic (
8080 source: """
81- @JS public func combine<T: _BridgedSwiftGenericBridgeable , U: _BridgedSwiftGenericBridgeable >(_ a: T) -> T { a }
81+ @JS public func combine<T: BridgedSwiftGenericBridgeable , U: BridgedSwiftGenericBridgeable >(_ a: T) -> T { a }
8282 """ ,
8383 contains: " must be used in at least one parameter "
8484 )
@@ -88,7 +88,7 @@ import Testing
8888 func genericParameterMustBeUsedAsParameter( ) {
8989 expectDiagnostic (
9090 source: """
91- @JS public func f<T: _BridgedSwiftGenericBridgeable >() -> T { fatalError() }
91+ @JS public func f<T: BridgedSwiftGenericBridgeable >() -> T { fatalError() }
9292 """ ,
9393 contains: " must be used in at least one parameter "
9494 )
@@ -98,7 +98,7 @@ import Testing
9898 func genericConcreteReturnUnsupported( ) {
9999 expectDiagnostic (
100100 source: """
101- @JS public func f<T: _BridgedSwiftGenericBridgeable >(_ v: T) -> String { " " }
101+ @JS public func f<T: BridgedSwiftGenericBridgeable >(_ v: T) -> String { " " }
102102 """ ,
103103 contains: " must return the generic type "
104104 )
@@ -110,7 +110,7 @@ import Testing
110110 source: """
111111 @JS class Box {
112112 @JS init() {}
113- @JS func wrap<T: _BridgedSwiftGenericBridgeable >(_ v: T) async -> T { v }
113+ @JS func wrap<T: BridgedSwiftGenericBridgeable >(_ v: T) async -> T { v }
114114 }
115115 """ ,
116116 contains: " Generic @JS functions cannot be 'async' yet. "
@@ -123,7 +123,7 @@ import Testing
123123 source: """
124124 @JS class Box {
125125 @JS init() {}
126- @JS func wrap<T: _BridgedSwiftGenericBridgeable >(_ v: T) throws(JSException) -> T { v }
126+ @JS func wrap<T: BridgedSwiftGenericBridgeable >(_ v: T) throws(JSException) -> T { v }
127127 }
128128 """ ,
129129 contains: " Generic @JS functions cannot be 'throws' yet. "
@@ -136,7 +136,7 @@ import Testing
136136 source: """
137137 @JS class Box {
138138 @JS init() {}
139- @JS func wrap<T: _BridgedSwiftGenericBridgeable >(_ v: T) -> T where T: Sendable { v }
139+ @JS func wrap<T: BridgedSwiftGenericBridgeable >(_ v: T) -> T where T: Sendable { v }
140140 }
141141 """ ,
142142 contains: " 'where' clauses are not supported on generic @JS functions. "
@@ -153,7 +153,7 @@ import Testing
153153 }
154154 """ ,
155155 contains:
156- " Generic parameter 'T' must be constrained to '_BridgedSwiftGenericBridgeable ' to be used with @JS. "
156+ " Generic parameter 'T' must be constrained to 'BridgedSwiftGenericBridgeable ' to be used with @JS. "
157157 )
158158 }
159159
@@ -163,7 +163,7 @@ import Testing
163163 source: """
164164 @JS class Box {
165165 @JS init() {}
166- @JS func count<T: _BridgedSwiftGenericBridgeable >(_ v: T) -> Int { 0 }
166+ @JS func count<T: BridgedSwiftGenericBridgeable >(_ v: T) -> Int { 0 }
167167 }
168168 """ ,
169169 contains: " must return the generic type "
@@ -176,7 +176,7 @@ import Testing
176176 source: """
177177 @JS enum E {
178178 case a
179- @JS func f<T: _BridgedSwiftGenericBridgeable >(_ v: T) -> T { v }
179+ @JS func f<T: BridgedSwiftGenericBridgeable >(_ v: T) -> T { v }
180180 }
181181 """ ,
182182 contains: " Only static functions are supported in enums "
0 commit comments