Try Union{Nothing, Some{T}} instead of Uninitialized?
EDIT: ah, nevermind, same problem.
Try Union{Nothing, Some{T}} instead of Uninitialized?
EDIT: ah, nevermind, same problem.
If anyone is following along, I opened a PR for the Ref implementation that doesn’t force mutable https://github.com/KristofferC/LazilyInitializedFields.jl/pull/1. It’s a bit more complicated than I liked due to the reasons given above.