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
julia> anns = [:x=>"a", :y=>1]
# this works:
julia> Base.AnnotatedString("abc def", [(i:i, anns[i]) for i in1:2])
"abc def"# but after replacing 2 with 0 doesn't:
julia> Base.AnnotatedString("abc def", [(i:i, anns[i]) for i in1:0])
ERROR: MethodError: no method matching Base.AnnotatedString(::String, ::Vector{Tuple{UnitRange{Int64}, Any}})
I think the constructor type constraints are too restrictive.
The text was updated successfully, but these errors were encountered:
julia> eltype([(i:i, anns[i]) for i in1:0])
Tuple{UnitRange{Int64}, Any}
julia> eltype([(i:i, anns[i]) for i in1:2])
Tuple{UnitRange{Int64}, Pair{Symbol, Any}}
You could specify the element type when constructing the vector, though.
I think the constructor type constraints are too restrictive.
The text was updated successfully, but these errors were encountered: