3
그래서 두 경우 사이의 결정적인 차이점은 무엇입니까형식 오류의 typeassert는
TypeError: typeassert: expected Dict{K,Array{V,1}}, got
Dict{Int64,Array{Int64,1}}
in include_string(::String, ::String) at loading.jl:441
in eval(::Module, ::Any) at boot.jl:234
in (::Atom.##65#68)() at eval.jl:40
in withpath(::Atom.##65#68, ::Void) at utils.jl:30
in withpath(::Function, ::Void) at eval.jl:46
in macro expansion at eval.jl:109 [inlined]
in (::Atom.##64#67{Dict{String,Any}})() at task.jl:60
그러나 벡터 자체 typealias Vector{T} Array{T,1}
있는 그대로를 따르고 다음과 같은 동작을
a = [1,2,3]
a::Vector # works
d = Dict(0=>a)
typealias DictVector{K,V} Dict{K, Vector{V}}
d::DictVector # fails
오류를 이해하지 못하는 ?
모든 설명은 매우 복잡합니다.
감사 명확히 대한 많은. 나는 이것이 일하기로되어서 기쁘다. – schlichtanders