-
-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Description
I am having a problem when I assign a value to a Nullable which it a sub-type of the type contained by the Nullable. This works in 0.4, but not with Compat.
Here is the problem:
julia> abstract Parent
julia> immutable Child <: Parent end
julia> type Container x::Nullable{Parent} end
julia> c = Container(Child())
ERROR: `convert` has no method matching convert(::Type{Nullable{Parent}}, ::Child)
in Container at no file
However, I have no idea how you solve this because:
julia> convert{T,S<:T}(::Type{Nullable{T}}, s::S) = Nullable{T}(s)
ERROR: T not defined
Metadata
Metadata
Assignees
Labels
No labels