Skip to content

Issue with calling a macro that defines a multiarity function #1163

@ikappaki

Description

@ikappaki

Hi,

there appears to be an issue with calling a macro that defines a multiarity function
error occurred during macroexpansion: Expected an argument vector {:found ([] 5)}

To reproduce, open up the REPL and call the macro defining the multiarity function

> basilisp repl
basilisp.user=> (defmacro issue [] `(defn y ([] 5)))
#'basilisp.user/issue

basilisp.user=> (issue)

  exception: <class 'basilisp.lang.exception.ExceptionInfo'> from <class 'basilisp.lang.compiler.exception.CompilerException'>
      phase: :macroexpansion
    message: error occurred during macroexpansion: Expected an argument vector {:found ([] 5)}
       form: (basilisp.core/defn basilisp.user/y ([] 5))
   location: <REPL Input>:1

The same works in Clojure as expected

> clj
Clojure 1.7.0
user=> (defmacro issue [] `(defn y ([] 5)))
#'user/issue
user=> (issue)
#'user/y
user=> (y)
5

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions