Skip to content

Commit 5f5db13

Browse files
committed
Improve error message
1 parent 865739e commit 5f5db13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/InteractiveUtils/src/macros.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ function construct_callable(@nospecialize(func::Type))
106106
# Don't support type annotations otherwise, we don't want to give wrong answers
107107
# for callables such as `(::Returns{Int})(args...)` where using `Returns{Int}`
108108
# would give us code for the constructor, not for the callable object.
109-
throw(ArgumentError("If a function type is explicitly provided, it must be a singleton whose only instance is the callable object"))
109+
throw(ArgumentError("If a function type is explicitly provided, it must be a singleton whose only instance is the callable object.
110+
To alleviate this restriction, the reflection macro may use `use_signature_tuple = true` from `gen_call_with_extracted_types`."))
110111
end
111112

112113
function separate_kwargs(exs::Vector{Any})

0 commit comments

Comments
 (0)