Last active
August 29, 2015 14:21
-
-
Save bensu/e146fff87a67f41798ca to your computer and use it in GitHub Desktop.
Compiles without warnings even though there is a potential name conflict.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns import-names.core | |
(:import (java.util Date))) | |
(def Date "Should this compile?") | |
(defn -main [] | |
(println Date)) | |
;; Throws: | |
;; Exception in thread "main" java.lang.RuntimeException: | |
;; Expecting var, but Date is mapped to class java.util.Date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns import-names.core | |
(:import [goog debug])) | |
;; This var has the same name as an imported JS object | |
(def debug goog.debug) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment