```julia function foo(a::AbstractVector) T = eltype(a) b = Vector{T}() c = [Set{T}() for x in a] return length(c) end a = rand(1:10, 200); ``` `@code_warntype` shows an inference failure in `b` and `c`. Changing to `c = Set{T}[Set{T}() for x in a]` fixes `c`'s inference issue.