julia> function permutations(v::Vector{T}) where T <: Any
nbase= length(v)
results= Vector{Vector{T}}(0)
for it=0:(nbase^nbase-1)
push!( results, v[digits( it; base=nbase, pad=nbase ) .+ 1] )
end#for
results
end#function##

Under 0.7, I got the helpful warnings, that led me to write a function that no longer works under 1.0 (and that readers should now ignore, given the solution):

What is the helpful warning youâ€™ve got? Can you paste and follow that exactly? Your â€śfixâ€ť appears to be wrong. (It should be a warning about the constructor while you changed the type signature in a strange way).

Iâ€™m amused that it didnâ€™t error but the reason your â€śfixâ€ť seems to work is that you didnâ€™t actually removed the previous method, you are still calling the method with the depwarn which isnâ€™t printing it anymore after the first call.

I assume you realized that Array{T, 1} is Vector{T} so itâ€™s asking you to change the call to the method Vector{T}(m::Int) where T to Vector{T}(undef, m) instead.

The first one is a method signature, the second is the call syntax, thatâ€™s why the where T is not there. It has nothng to do with removing where T from the code.

I think what yuyichao and the error message means is that in your original function, results= Vector{Vector{T}}(0) should be results = Vector{Vector{T}}(undef, 0).