ClojureScript

Warn on invalid js forms

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor 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.

  1. patch-cljs-455.diff
    12/Jan/13 6:21 AM
    4 kB
    Jonas Enlund
  2. revert-455.diff
    03/Feb/13 10:23 PM
    4 kB
    Jonas Enlund

Activity

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: