Skip to content

Commit

Permalink
fix for pre nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Oct 5, 2020
1 parent 30cdb66 commit d5632aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/LazilyInitializedFields.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ Base.show(io::IO, b::Box) = show(io, b.x)

# This is a replication of the Nothing and Missing conversion functionality from Base.
# nonuninittype(::Type{T}) where {T} = Core.Compiler.typesubtract(T, Uninitialized)
nonuninittype(::Type{T}) where {T} = Base.typesplit(T, Uninitialized)
if isdefined(Base, :typesplit)
nonuninittype(::Type{T}) where {T} = Base.typesplit(T, Uninitialized)
else
nonuninittype(::Type{T}) where {T} = Core.Compiler.typesubtract(T, Uninitialized)
end
promote_rule(T::Type{Uninitialized}, S::Type) = Union{S, Uninitialized}
function promote_rule(T::Type{>:Uninitialized}, S::Type)
R = nonuninittype(T)
Expand Down

0 comments on commit d5632aa

Please sign in to comment.