You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type Foo{K}
end
Foo(K::Type) = Foo{K}()
immutable B{T}
p::T
end
function run_this{K}(foo::Foo{K})
# deepcopy(foo)
result = map(i -> deepcopy(foo), 1:2)
end
run_this(Foo(B))
gives an error:
ERROR: TypeError: _collect: in typeassert, expected Foo{B}, got Foo{B}
in _collect(::UnitRange{Int64}, ::Base.Generator{UnitRange{Int64},##1#2{Foo{B}}}, ::Base.EltypeUnknown, ::Base.HasShape) at ./array.jl:379
in run_this(::Foo{B}) at ./REPL[4]:3
Reproducible on Julia 0.5.0 as well as today's nightly build, though not on Julia 0.4.7.
Any of the following actions remove the error:
unwrapping code from a function
uncommenting line deepcopy(foo) (all further calls to map(...) start working too)
adding type parameter to B in the last line, e.g. run_this(Foo(B{Int}))
The text was updated successfully, but these errors were encountered:
The original code currently has too many broken dependencies to run on 0.6, but I will make a note for myself to check it next time I come across it. Thanks and great work!
The following code:
gives an error:
Reproducible on Julia 0.5.0 as well as today's nightly build, though not on Julia 0.4.7.
Any of the following actions remove the error:
deepcopy(foo)
(all further calls tomap(...)
start working too)B
in the last line, e.g.run_this(Foo(B{Int}))
The text was updated successfully, but these errors were encountered: