Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ true
@inline unit(x::Type{Missing}) = missing
@inline unit(x::Missing) = missing

# Prevent infinite recursion, in case unit(Any) is called.
@inline unit(x::Type{Any}) = throw(ArgumentError(
"unit(Any) was called, which has no meaningful result. This may be due to calling unit(eltype(…)), since eltype has a generic fallback method that returns Any."
))

"""
absoluteunit(::Units)
absoluteunit(::Quantity)
Expand Down
Loading