diff --git a/base/operators.jl b/base/operators.jl index bee2949e4918f3..c24da9719c8d55 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -1170,13 +1170,13 @@ struct Fix{N,F,T} <: Function f::F x::T - function Fix{N}(f::F, x) where {N,F} + function Fix{N}(f::Union{F,Type{F}}, x) where {N,F} if !(N isa Int) throw(ArgumentError(LazyString("expected type parameter in `Fix` to be `Int`, but got `", N, "::", typeof(N), "`"))) elseif N < 1 throw(ArgumentError(LazyString("expected `N` in `Fix{N}` to be integer greater than 0, but got ", N))) end - new{N,_stable_typeof(f),_stable_typeof(x)}(f, x) + new{N,F,_stable_typeof(x)}(f, x) end end