Skip to content

Commit a10703b

Browse files
committed
Add TODO.md
1 parent 16998dc commit a10703b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

TODO.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# TODO
2+
3+
## Method resolution doesn't walk class hierarchy for interface methods
4+
5+
`.meta` on a value type-hinted as `^clojure.lang.APersistentMap` fails with `NoSuchFieldException: meta`, even though APersistentMap implements `IMeta`. Workaround: hint with the interface directly, e.g. `(.meta ^clojure.lang.IMeta this)`.
6+
7+
Repro in bb:
8+
9+
```clojure
10+
(let [m (proxy [clojure.lang.APersistentMap clojure.lang.IMeta clojure.lang.IObj] []
11+
(iterator [] (.iterator {}))
12+
(containsKey [k] false)
13+
(entryAt [k] nil)
14+
(valAt ([k] nil) ([k d] d))
15+
(count [] 0)
16+
(assoc [k v] nil)
17+
(without [k] nil)
18+
(seq [] nil)
19+
(meta [] {:works true})
20+
(withMeta [md] nil)
21+
(toString [] (str (.meta this))))]
22+
(.toString m))
23+
```

0 commit comments

Comments
 (0)