@@ -312,10 +312,10 @@ function _test_cotangent(
312
312
end
313
313
314
314
# we marked the argument as non-differentiable
315
- function _test_cotangent (:: NoTangent , ad_cotangent, :: NoTangent ; kwargs... )
315
+ function _test_cotangent (:: NoTangent , ad_cotangent, :: NoTangent , msg = " " ; kwargs... )
316
316
@test ad_cotangent isa NoTangent
317
317
end
318
- function _test_cotangent (:: NoTangent , :: ZeroTangent , :: NoTangent ; kwargs... )
318
+ function _test_cotangent (:: NoTangent , :: ZeroTangent , :: NoTangent , msg = " " ; kwargs... )
319
319
error (
320
320
" The pullback in the rrule should use NoTangent()" *
321
321
" rather than ZeroTangent() for non-perturbable arguments."
324
324
function _test_cotangent (
325
325
:: NoTangent ,
326
326
ad_cotangent:: ChainRulesCore.NotImplemented ,
327
- :: NoTangent ;
327
+ :: NoTangent ,
328
+ msg= " " ;
328
329
kwargs... ,
329
330
)
330
331
# this situation can occur if a cotangent is not implemented and
@@ -334,6 +335,6 @@ function _test_cotangent(
334
335
# https://github.com/JuliaDiff/ChainRulesTestUtils.jl/issues/217
335
336
@test_broken ad_cotangent isa NoTangent
336
337
end
337
- function _test_cotangent (:: NoTangent , ad_cotangent, fd_cotangent; kwargs... )
338
+ function _test_cotangent (:: NoTangent , ad_cotangent, fd_cotangent, msg = " " ; kwargs... )
338
339
error (" cotangent obtained with finite differencing has to be NoTangent()" )
339
340
end
0 commit comments