Returning function from let with attached metadata results in invalid Javascript

Description

Consider the following code:

core.cljs

It works and prints 2 in regular Clojure (1.7.0), but compiles to the following Javascript with ClojureScript:

core.js

It's the line containing return return (function (){: since return is a keyword in JS which can't be followed by another return, this results in a syntax error in the browser I've tested (FF).

Environment

Linux & FreeBSD + 64bit OpenJDK8

Activity

David Nolen 
January 5, 2016 at 10:49 PM

dupe of

Completed

Details

Assignee

Reporter

Affects versions

Priority

Created November 5, 2015 at 4:32 PM
Updated January 5, 2016 at 10:49 PM
Resolved January 5, 2016 at 10:49 PM