Hi,
this no longer works in v 0.7
what is the proper way to do this?
julia> struct XDD{T}
x::T
XDD() = new{T}()
end
julia> a= XDD{Int}()
ERROR: MethodError: no method matching XDD{Int64}()
Hi,
this no longer works in v 0.7
what is the proper way to do this?
julia> struct XDD{T}
x::T
XDD() = new{T}()
end
julia> a= XDD{Int}()
ERROR: MethodError: no method matching XDD{Int64}()
I think you want,
struct XDD{T}
x::T
XDD{T}() where {T} = new{T}()
end
julia> struct XDD{T}
x::T
XDD() = new{T}()
end
I’m wondering why this isn’t an “outer-only constructor” on v0.6.