Skip to content

Instantly share code, notes, and snippets.

@amalloy
Created December 28, 2010 08:36
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 amalloy/757058 to your computer and use it in GitHub Desktop.
Save amalloy/757058 to your computer and use it in GitHub Desktop.
user=> (set! *warn-on-reflection* true)
true
user=> (defrecord A [^int x])
user.A
user=> (defrecord B [^A a])
user.B
user=> (. (A. 1) x)
1
user=> (.. (B. (A. 1)) a x)
Reflection warning, NO_SOURCE_PATH:44 - reference to field x can't be resolved.
1
user=> (show B 37)
#<Field public final java.lang.Object user.B.a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment