1212TruncatedStacktraces. @truncate_stacktrace FunctionWrappersWrapper
1313
1414function (fww:: FunctionWrappersWrapper{FW, FB} )(args:: Vararg{Any, K} ) where {FW, K, FB}
15- _call (fww. fw, args, fww)
15+ return _call (fww. fw, args, fww)
1616end
1717
18- function _call (fw:: Tuple{FunctionWrappers.FunctionWrapper{R, A}, Vararg} ,
19- arg:: A , fww:: FunctionWrappersWrapper ) where {R, A}
20- first (fw)(arg... )
18+ function _call (
19+ fw:: Tuple{FunctionWrappers.FunctionWrapper{R, A}, Vararg} ,
20+ arg:: A , fww:: FunctionWrappersWrapper
21+ ) where {R, A}
22+ return first (fw)(arg... )
2123end
22- function _call (fw:: Tuple{FunctionWrappers.FunctionWrapper{R, A1}, Vararg} ,
23- arg:: A2 , fww:: FunctionWrappersWrapper ) where {R, A1, A2}
24- _call (Base. tail (fw), arg, fww)
24+ function _call (
25+ fw:: Tuple{FunctionWrappers.FunctionWrapper{R, A1}, Vararg} ,
26+ arg:: A2 , fww:: FunctionWrappersWrapper
27+ ) where {R, A1, A2}
28+ return _call (Base. tail (fw), arg, fww)
2529end
2630
2731const NO_FUNCTIONWRAPPER_FOUND_MESSAGE = " No matching function wrapper was found!"
2832
2933struct NoFunctionWrapperFoundError <: Exception end
3034
3135function Base. showerror (io:: IO , e:: NoFunctionWrapperFoundError )
32- print (io, NO_FUNCTIONWRAPPER_FOUND_MESSAGE)
36+ return print (io, NO_FUNCTIONWRAPPER_FOUND_MESSAGE)
3337end
3438
3539function _call (:: Tuple{} , arg, fww:: FunctionWrappersWrapper{<:Any, false} )
3640 throw (NoFunctionWrapperFoundError ())
3741end
3842function _call (:: Tuple{} , arg, fww:: FunctionWrappersWrapper{<:Any, true} )
39- first (fww. fw). obj[](arg... )
43+ return first (fww. fw). obj[](arg... )
4044end
4145
4246function FunctionWrappersWrapper (
4347 f:: F , argtypes:: Tuple{Vararg{Any, K}} , rettypes:: Tuple{Vararg{DataType, K}} ,
44- fallback:: Val{FB} = Val {false} ()) where {F, K, FB}
48+ fallback:: Val{FB} = Val {false} ()
49+ ) where {F, K, FB}
4550 fwt = map (argtypes, rettypes) do A, R
4651 FunctionWrappers. FunctionWrapper {R, A} (f)
4752 end
48- FunctionWrappersWrapper {typeof(fwt), FB} (fwt)
53+ return FunctionWrappersWrapper {typeof(fwt), FB} (fwt)
4954end
5055
5156"""
@@ -95,7 +100,7 @@ wrapped_signatures(fww) # Returns (Tuple{Float64, Float64}, Tuple{Int, Int})
95100See also: [`unwrap`](@ref), [`wrapped_return_types`](@ref)
96101"""
97102function wrapped_signatures (fww:: FunctionWrappersWrapper )
98- map (fw -> typeof (fw). parameters[2 ], fww. fw)
103+ return map (fw -> typeof (fw). parameters[2 ], fww. fw)
99104end
100105
101106"""
@@ -115,7 +120,7 @@ wrapped_return_types(fww) # Returns (Float64, Int64)
115120See also: [`unwrap`](@ref), [`wrapped_signatures`](@ref)
116121"""
117122function wrapped_return_types (fww:: FunctionWrappersWrapper )
118- map (fw -> typeof (fw). parameters[1 ], fww. fw)
123+ return map (fw -> typeof (fw). parameters[1 ], fww. fw)
119124end
120125
121126using PrecompileTools
0 commit comments