-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Labels
bugThis is not expected behavior, and needs fixingThis is not expected behavior, and needs fixing
Description
The code below produces the error:
compile error: splice can only be used in function parameters and data constructors, it has no effect here
(do (def (n) [(splice [])]) n)(The original code was a let, which I reduced, and this is the expansion.)
I believe this is a false positive, since the splice form is in a data constructor. These variations of the code don't cause the error:
(def (n) [(splice [])]) n # no do wrapper
(do (def n [(splice [])]) n) # no destructuring
(do (def (n) [1(splice [])]) n) # extra element before the spliceMetadata
Metadata
Assignees
Labels
bugThis is not expected behavior, and needs fixingThis is not expected behavior, and needs fixing