Skip to content

Commit

Permalink
linter: don't resolve symbols inside unevaluated macros
Browse files Browse the repository at this point in the history
  • Loading branch information
candid82 committed Jan 26, 2017
1 parent eac6961 commit 29919ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ func parseSetMacro(obj Object, ctx *ParseContext) Expr {
func isUnknownCallable(expr Expr) bool {
switch c := expr.(type) {
case *VarRefExpr:
return c.vr.expr == nil
return (c.vr.isMacro && c.vr.Value == nil) || c.vr.expr == nil
default:
return false
}
Expand Down
3 changes: 2 additions & 1 deletion tests/symbols-lint.joke
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[spec :as s])
(:import [java.security Security]))


(defmacro test-macro [x])

(def f [])
(f 1)
Expand All @@ -23,3 +23,4 @@
(f j)
(f1 1)
(tt/g 3)
(test-macro uuu)

0 comments on commit 29919ba

Please sign in to comment.