Skip to content

Commit 9858d80

Browse files
oxinaboxaviatesk
andauthored
show signature
Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
1 parent 66f2c2d commit 9858d80

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/stage1/recurse_fwd.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ function ∂☆nomethd(@nospecialize(args))
2929
end
3030
function ∂☆builtin((f_bundle, args...))
3131
f = primal(f_bundle)
32-
throw(DomainError(f, "No `ChainRulesCore.frule` found for the built-in function `$f`"))
32+
argtypes = Any[Core.Typeof(primal(arg)) for arg in args]
33+
tt = Base.signature_type(f, argtypes)
34+
sig = Base.sprint(Base.show_tuple_as_call, Symbol(""), tt)
35+
throw(DomainError(f, "No `ChainRulesCore.frule` found for the built-in function `$sig`"))
3336
end
3437

3538
function perform_fwd_transform(world::UInt, source::LineNumberNode,

0 commit comments

Comments
 (0)