ClojureScript ignores first two arguments passed to a macro when using vargs

Description

The following code produces different results in clojure and in clojurescript

In clojure that code outputs (0 1 2 3)
In clojurescript that code outputs (2 3)

Environment

None

Activity

Show:
Mike Fikes
November 20, 2017, 2:32 AM

Ethan, I suspect this ticket is invalid. Are you defining the macro in the REPL? If you do that, you will see the consequence that macros are really just functions called by the compiler (with two extra special arguments &env and &form, which you are passing as 0 and 1 in your example code).

Macros in ClojureScript need to be defined in a separate namespace and consumed using :require-macros. See more at https://clojurescript.org/about/differences#_macros

Assignee

Unassigned

Reporter

import