Warn on invalid js forms

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.

Environment

None

Status

Assignee

Jonas Enlund

Reporter

Jonas Enlund

Labels

None

Approval

None

Patch

Code

Priority

Minor