<< Back to previous view

[CLJS-625] apply constructor generates invalid JS Created: 18/Oct/13  Updated: 03/May/15  Resolved: 03/May/15

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Trivial
Reporter: George Fraser Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None
Environment:

0.0-1913



 Description   

(apply js/String. "foo")

generates the javscript:

cljs.core.apply.call(null,String.,"foo")

which does not parse. This seems like a bad failure mode.



 Comments   
Comment by Antonin Hildebrand [ 03/May/15 4:42 AM ]

A note to myself: a possible javascript solution is outlined here:
http://stackoverflow.com/questions/1606797/use-of-apply-with-new-operator-is-this-possible

Comment by David Nolen [ 03/May/15 7:13 AM ]

This isn't valid Clojure(Script). Whether we should produce a warning of some kind is a separate issue.

Generated at Sat May 30 09:58:18 CDT 2015 using JIRA 4.4#649-r158309.