using AllocCheck
"""
swap two values from vector v at indices i and j
"""
@check_allocs swap!(v::AbstractVector, i, j) = begin
v[i], v[j] = v[j], v[i]
v
end
$ julia bug.jl
ERROR: LoadError: cannot document the following expression:
#= [...]/bug.jl:6 =# @check_allocs swap!(v::AbstractVector, i, j) = begin
#= [...]/bug.jl:6 =#
#= [...]/bug.jl:7 =#
(v[i], v[j]) = (v[j], v[i])
#= [...]/bug.jl:8 =#
v
end
'@check_allocs' not documentable. See 'Base.@__doc__' docs for details.
Stacktrace:
[1] error(::String, ::String)
@ Base ./error.jl:44
[2] top-level scope
@ [...]/bug.jl:3
in expression starting at [...]/bug.jl:3