Created
March 14, 2014 21:41
-
-
Save halgari/9557588 to your computer and use it in GitHub Desktop.
This file contains 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
(deftype MapProperty [^:volatile-mutable listeners ^:volatile-mutable value] | |
ObservableValue | |
(addListener [this listener] | |
(set! listeners (conj listeners listener)) | |
nil)) | |
;; fails with CompilerException java.lang.IllegalArgumentException: Must hint overloaded method: addListener | |
(deftype MapProperty [^:volatile-mutable listeners ^:volatile-mutable value] | |
ObservableValue | |
(addListener [this ^ChangeListener listener] | |
(set! listeners (conj listeners listener)) | |
nil)) | |
;; fails with CompilerException java.lang.IllegalArgumentException: Mismatched return type: addListener, expected: void, had: java.lang.Object | |
(deftype MapProperty [^:volatile-mutable listeners ^:volatile-mutable value] | |
ObservableValue | |
(addListener ^void [this ^ChangeListener listener] | |
(set! listeners (conj listeners listener)) | |
nil)) | |
;; fails with Mismatched return type: addListener, expected: void, had: java.lang.Object | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment