Skip to content

Instantly share code, notes, and snippets.

@robertpfeiffer
Created January 16, 2009 21:10
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 robertpfeiffer/48138 to your computer and use it in GitHub Desktop.
Save robertpfeiffer/48138 to your computer and use it in GitHub Desktop.
/*
inner class Java/Clojure interop test case
Java part: R.java
compile this and put it in your $CLASSPATH
*/
public class R {
class I { final R outerI = R.this ;}
public I makeAnI() { return this.new I(); }
}
; Clojure Part: Enter on the REPL
(import 'R)
(.makeAnI (new R))
# Works in Groovy
new R().makeAnI()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment