Skip to content

Commit cb53974

Browse files
committed
fix missing parameter
1 parent c36d81c commit cb53974

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/testers.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ function _test_cotangent(
312312
end
313313

314314
# 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...)
316316
@test ad_cotangent isa NoTangent
317317
end
318-
function _test_cotangent(::NoTangent, ::ZeroTangent, ::NoTangent; kwargs...)
318+
function _test_cotangent(::NoTangent, ::ZeroTangent, ::NoTangent, msg=""; kwargs...)
319319
error(
320320
"The pullback in the rrule should use NoTangent()" *
321321
" rather than ZeroTangent() for non-perturbable arguments."
@@ -324,7 +324,8 @@ end
324324
function _test_cotangent(
325325
::NoTangent,
326326
ad_cotangent::ChainRulesCore.NotImplemented,
327-
::NoTangent;
327+
::NoTangent,
328+
msg="";
328329
kwargs...,
329330
)
330331
# this situation can occur if a cotangent is not implemented and
@@ -334,6 +335,6 @@ function _test_cotangent(
334335
# https://github.com/JuliaDiff/ChainRulesTestUtils.jl/issues/217
335336
@test_broken ad_cotangent isa NoTangent
336337
end
337-
function _test_cotangent(::NoTangent, ad_cotangent, fd_cotangent; kwargs...)
338+
function _test_cotangent(::NoTangent, ad_cotangent, fd_cotangent, msg=""; kwargs...)
338339
error("cotangent obtained with finite differencing has to be NoTangent()")
339340
end

0 commit comments

Comments
 (0)