-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clean-ns removes imported inner classes #332
Comments
Thanks for the excellent bug report! |
Is it possible we had a regression on this? I'm noticing the same behavior, My test case: (ns playground.test
(:import [java.awt.geom Line2D$Double]))
(defn foo []
(Line2D$Double. 0 0 5 5)) Running (ns playground.test
(:import java.awt.geom.Line2D))
(defn foo []
(Line2D$Double. 0 0 5 5)) Which does not compile because the reference to the inner class was removed.
|
The tests are still passing, and the code hasn't been touched since, ut I guess it's possible. I'll have a look later. |
fix deployed to clojars |
I'm running the latest version, 2.3.1, and still seem to be experiencing this. |
Expected behavior
When an (:import) form refers to several inner classes that are used in my namespace
and I run a cljr-clean-ns, I expect clean-ns to leave the import alone.
Actual behavior
In the following ns form, the classes were generated from protocol buffer definitions. These are static inner classes.
After clean-ns, I am left with the following:
This is not correct, because an import of the enclosing class does not make aliases for all the inner classes.
Steps to reproduce the problem
Start with an empty namespace. Add imports of inner classes. Run cljr-clean-ns.
Environment & Version information
clj-refactor.el version information
2.2.0
CIDER version information
CIDER 0.12.0
Clojure 1.8.0
nREPL 0.2.12
Leiningen or Boot version
Emacs version
Operating system
OS X 10.11 "El Capitan"
The text was updated successfully, but these errors were encountered: