From d5632aa1a41be4c1df680afe4e9db863c41cc9a2 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Mon, 5 Oct 2020 22:21:40 +0200 Subject: [PATCH] fix for pre nightly --- src/LazilyInitializedFields.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/LazilyInitializedFields.jl b/src/LazilyInitializedFields.jl index 02dfb58..f251ab5 100644 --- a/src/LazilyInitializedFields.jl +++ b/src/LazilyInitializedFields.jl @@ -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)