Skip to content

Instantly share code, notes, and snippets.

@tnoborio
Created September 5, 2010 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnoborio/565876 to your computer and use it in GitHub Desktop.
Save tnoborio/565876 to your computer and use it in GitHub Desktop.
(ns hoge.core
(:import Hoge))
(def _nil_ nil)
(Hoge. _nil_) ; => called Hoge(String)
(Hoge. (identity nil)) ; => called Hoge(String)
(Hoge. (cast Integer nil)) ; => "called Hoge(String)"
(Hoge. nil) ; => Thrown class java.lang.IllegalArgumentException. More than one matching method found: Hoge
public class Hoge {
public Hoge(String str) {
System.out.println("called Hoge(String)");
}
public Hoge(int i) {
System.out.println("called Hoge(int)");
}
public Hoge(String[] strs) {
System.out.println("called Hoge(String[])");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment