Skip to content

Commit 842ab88

Browse files
authored
Merge branch 'master' into type-inf-improvements
2 parents 96d6843 + 397ce84 commit 842ab88

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/StaticLint.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ function get_path(x::EXPR, state)
293293
seterror!(arg, IncludePathContainsNULL)
294294
return ""
295295
end
296-
push!(path_elements, string(valofid(arg)))
296+
push!(path_elements, string(valof(arg)))
297297
else
298298
return ""
299299
end

src/bindings.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ function add_binding(x, state, scope=state.scope)
354354
check_const_decl(name, b, scope)
355355

356356
scope.names[name] = b
357-
elseif is_soft_scope(scope) && parentof(scope) isa Scope && scopehasbinding(parentof(scope), valofid(b.name)) && !enforce_hard_scope(x, scope)
357+
elseif is_soft_scope(scope) && parentof(scope) isa Scope && isidentifier(b.name) && scopehasbinding(parentof(scope), valofid(b.name)) && !enforce_hard_scope(x, scope)
358358
add_binding(x, state, scope.parent)
359359
else
360360
scope.names[name] = b

src/linting/checks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ function check_farg_unused_(arg, arg_names)
504504
# only self ref:
505505
(length(b.refs) == 1 && first(b.refs) == b.name) ||
506506
# first usage is assignment:
507-
(length(b.refs) > 1 && CSTParser.hasparent(b.refs[2]) && isassignment(parentof(b.refs[2])) && parentof(b.refs[2]).args[1] == b.refs[2])
507+
(length(b.refs) > 1 && b.refs[2] isa EXPR && CSTParser.hasparent(b.refs[2]) && isassignment(parentof(b.refs[2])) && parentof(b.refs[2]).args[1] == b.refs[2])
508508
seterror!(arg, UnusedFunctionArgument)
509509
end
510510

0 commit comments

Comments
 (0)