diff --git a/src/fennel-ls/compiler.fnl b/src/fennel-ls/compiler.fnl index 813d679..9ac3c03 100644 --- a/src/fennel-ls/compiler.fnl +++ b/src/fennel-ls/compiler.fnl @@ -80,7 +80,7 @@ later by fennel-ls.language to answer requests from the client." (table.insert target.referenced-by ast))))) (λ symbol-to-expression [ast scope ?reference?] - (if ?reference? + (when (or ?reference? (fennel.multi-sym? ast)) (reference ast scope))) (λ define [?definition binding scope] diff --git a/test/diagnostic-test.fnl b/test/diagnostic-test.fnl index 935f053..dec4092 100644 --- a/test/diagnostic-test.fnl +++ b/test/diagnostic-test.fnl @@ -97,7 +97,7 @@ (it "does not warn if a field is used" (let [self (create-client) - responses (self:open-file! filename "(fn [abc] (set abc.xyz 10))")] + responses (self:open-file! filename "(fn [a b] (set a.x 10) (fn b.f []))")] (assert (not (?. responses 1 :params :diagnostics 1))))) (it "warns when using the : special when a multisym would do"