Open
Description
julia> using JET
julia> report_opt(copy!, Tuple{Memory{Int}, Vector{Int}})
═════ 1 possible error found ═════
┌ copy!(dst::Memory{Int64}, src::Vector{Int64}) @ Base ./abstractarray.jl:914
│ runtime dispatch detected: resize!(dst::Memory{Int64}, %12::Int64)
└────────────────────
julia> report_call(copy!, Tuple{Memory{Int}, Vector{Int}})
═════ 1 possible error found ═════
┌ copy!(dst::Memory{Int64}, src::Vector{Int64}) @ Base ./abstractarray.jl:914
│ no matching method found `resize!(::Memory{Int64}, ::Int64)`: resize!(dst::Memory{Int64}, length(src::Vector{Int64})::Int64)
└────────────────────
Should copy!
get a specialized method, given that it's not resizable?
The workaround is to call copyto!
instead.