ClojureScript

apply constructor generates invalid JS

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • 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.

Activity

Hide
Antonin Hildebrand added a comment -

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

Show
Antonin Hildebrand added a comment - 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
Hide
David Nolen added a comment -

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

Show
David Nolen added a comment - This isn't valid Clojure(Script). Whether we should produce a warning of some kind is a separate issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: