Skip to content

Commit b43536b

Browse files
SeSodesasostock
andauthored
Remove now-unnecessary comment about type restriction from unit(::Type{Union{Missing,T}})
Not needed after re-removal of type constraint. Co-authored-by: Sebastian Stock <[email protected]>
1 parent 156ffe2 commit b43536b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ const MISSING_UNIT_DEFINITION_MESSAGE =
154154
@inline unit(x::Type{Any}) = throw( DomainError( x, MISSING_UNIT_DEFINITION_MESSAGE ) )
155155
@inline unit(x::Number) = NoUnits
156156
@inline unit(x::Type{T}) where {T <: Number} = NoUnits
157-
@inline unit(x::Type{Union{Missing, T}}) where T = unit(T) # Type restriction required here for T, or might result in infinite recursion.
157+
@inline unit(x::Type{Union{Missing, T}}) where T = unit(T)
158158
@inline unit(x::Type{Missing}) = missing
159159
@inline unit(x::Missing) = missing
160160

0 commit comments

Comments
 (0)