Created
January 16, 2009 21:10
-
-
Save robertpfeiffer/48138 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
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