~xerool/fennel-ls#26: 
lambda's argument use shouldn't count

right now, code like

(lambda my-function [x unused-y]
  (print x))

does not show any unused variables. This is because once the macros are expanded, fennel-ls sees that "unused-y" is in a non-nil assert.

To match the (case (p) [x unused-y] (print x)) behavior, I want to mark "unused-y" as unused, even though the assert is present.

One way to do this is by using compiler hooks to swap all lambda with fn, and then swap it back later.

Status
RESOLVED CLOSED
Submitter
~xerool
Assigned to
No-one
Submitted
11 months ago
Updated
9 months ago
Labels
bug

~xerool 11 months ago

Mirror image of issue fennel-ls#24

~xerool REPORTED CLOSED 9 months ago

fixed

Register here or Log in to comment, or comment via email.