Skip to content

Commit 1f9cf9d

Browse files
committed
add test for JunoLab/Juno.jl#404
1 parent 143807f commit 1f9cf9d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/outline.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,24 @@
131131
end
132132
end
133133

134+
# detect all the method parameters of a method with a `where` clause
135+
let str = """
136+
function push!′(ary::Vector{T}, item::S) where {T, S<:T}
137+
tmpvec, tmpitem = ary, item
138+
push!(tmpvec, tmpitem)
139+
end
140+
"""
141+
142+
binds = map(l -> l[:name], Atom.locals(str, 1, 0))
143+
@test "ary" in binds
144+
@test "item" in binds
145+
@test "T" in binds
146+
@test "S" in binds
147+
@test "tmpvec" in binds
148+
@test "tmpitem" in binds
149+
@test "push!′" in binds
150+
end
151+
134152
let str = """
135153
function foo(x)
136154
@macrocall begin

0 commit comments

Comments
 (0)