Skip to content

Commit 99d6cb8

Browse files
authored
Merge pull request #271 from julia-vscode/fix123
fix loose_refs
2 parents 4594f21 + d230df3 commit 99d6cb8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utils.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ function is_nameof_func(name)
303303
end
304304

305305
function loose_refs(b::Binding)
306+
b.val isa EXPR || return b.refs # to account for `#global` binding which doesn't have a val
306307
scope = retrieve_scope(b.val)
308+
scope isa Scope && isidentifier(b.name) || return b.refs
307309
name_str = valofid(b.name)
308310
name_str isa String || return b.refs
309311

0 commit comments

Comments
 (0)