Skip to content

Ignore next form (#_) only works for the next form #1207

Closed
@pfeodrippe

Description

@pfeodrippe

In JVM/CLJS (others) clojure, we can use N #_ in sequence to ignore the next N forms, while for basilisp I have an error (at least when using it from a let as the error seems to be related to the macroexpansion).

;; This explodes.
(let [#_ #_ _ (bpy.ops.ed/undo_push)
      a 3])

;; This is fine
(let [#_ _ #_ (bpy.ops.ed/undo_push)
      a 3])

Error

 exception: <class 'basilisp.lang.exception.ExceptionInfo'> from <class 'basilisp.lang.compiler.exception.CompilerException'>
      phase: :macroexpansion
    message: error occurred during macroexpansion: Invalid destructuring argument type {:type :other}
       form: (let [(bpy.ops.ed/undo_push) a 3])
   location: /Users/pfeodrippe/dev/vybe/basilisp/src/vybe/basilisp/bake.lpy:54-55
    context:

 50   |       (set! bpy.context.view_layer.objects/active o)))
 51   | 
 52   | 
 53   | 
 54 > |   (let [#_ #_ _ (bpy.ops.ed/undo_push)
 55 > |         a 3])
 56   | 

Metadata

Metadata

Assignees

Labels

component:readerIssue pertaining to Basilisp reader moduleissue-type:bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions