Details
-
Type:
Enhancement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Patch:Code
Description
The ClojureScript compiler happily accepts forms like js/Math.MAX_NUMBER and (js/Math.ceil 3.14) which is not valid Clojure code. The correct way to write these expressions in ClojureScript is (.-MAX_NUMBER js/Math) and (.ceil js/Math 3.14).
The ClojureScript analyzer should at least emit a warning when these bad forms are encountered. Preferably compilation should fail but that would probably break lots of existing code.
Attachments
Activity
Jonas Enlund
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Patch | Code [ 10001 ] | |
| Attachment | patch-cljs-455.diff [ 11804 ] |
David Nolen
made changes -
| Resolution | Completed [ 1 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
David Nolen
made changes -
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
| Resolution | Completed [ 1 ] |
Jonas Enlund
made changes -
| Attachment | revert-455.diff [ 11830 ] |
David Nolen
made changes -
| Resolution | Completed [ 1 ] | |
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
Mailing list discussion here: https://groups.google.com/d/topic/clojure/rtmPtmpo4qA/discussion