@@ -180,56 +180,9 @@ func slope5(_ x: Float) -> Float {
180
180
return 5 * x
181
181
}
182
182
183
- // expected-error @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
184
- @differentiable ( jvp: foo)
183
+ // Test removed `jvp:' and 'vjp:' arguments.
184
+ // expected-error @+1 {{expected 'wrt:' or 'where' in '@differentiable' attribute}}
185
+ @differentiable ( jvp: foo, vjp: foo)
185
186
func bar( _ x: Float , _: Float ) -> Float {
186
187
return 1 + x
187
188
}
188
-
189
- // expected-error @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
190
- @differentiable ( vjp: foo)
191
- func bar( _ x: Float , _: Float ) -> Float {
192
- return 1 + x
193
- }
194
-
195
- // expected-error @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
196
- @differentiable ( vjp: foo, jvp: foo)
197
- func bar( _ x: Float , _: Float ) -> Float {
198
- return 1 + x
199
- }
200
-
201
- // expected-error @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
202
- @differentiable ( wrt: ( self , x, y) , jvp: foo)
203
- func bar( _ x: Float , _ y: Float ) -> Float {
204
- return 1 + x
205
- }
206
-
207
- // expected-error @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
208
- @differentiable ( wrt: ( self , x, y) , vjp: foo)
209
- func bar( _ x: Float , _ y: Float ) -> Float {
210
- return 1 + x
211
- }
212
-
213
- // expected-error @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
214
- @differentiable ( wrt: ( self , x, y) , jvp: foo, vjp: foo)
215
- func bar( _ x: Float , _ y: Float ) -> Float {
216
- return 1 + x
217
- }
218
-
219
- // expected-error @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
220
- @differentiable ( wrt: ( x) , jvp: foo where T : FloatingPoint)
221
- func bar< T : Numeric > ( _ x: T , _: T ) -> T {
222
- return 1 + x
223
- }
224
-
225
- // expected-error @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
226
- @differentiable ( wrt: ( x) , vjp: foo where T : FloatingPoint)
227
- func bar< T : Numeric > ( _ x: T , _: T ) -> T {
228
- return 1 + x
229
- }
230
-
231
- // expected-error @+1 {{'jvp:' and 'vjp:' arguments in '@differentiable' attribute are deprecated}}
232
- @differentiable ( wrt: ( x) , jvp: foo, vjp: foo where T : FloatingPoint)
233
- func bar< T : Numeric > ( _ x: T , _: T ) -> T {
234
- return 1 + x
235
- }
0 commit comments