Difference between '::UInt64' and '::Type(UInt64)'

I saw functions defined as

function check_bitstring_typeparams(::Val{B}, ::Val{1}, ::Type{UInt64}) where {B}
    if B > 64
        error("$B bits do not fit into a 64-bit chunk")
    end
end

What is the difference between ‘::UInt64’ and ‘::Type(UInt64)’?

For ‘::UInt64’, I know I need to input an unsigned integer with 64 bits, but what should I input for ‘::Type(UInt64)’?

You put UInt64. Example:

julia> f(x::UInt64) = 1
f (generic function with 1 methods)

julia> f(x::Type{UInt64}) = 2
f (generic function with 2 methods)

julia> f(UInt64(5))
1

julia> f(UInt64)
2
3 Likes