[CTYP-132] typechecker fails when checking a Protocol whose method gets called using dot notation Created: 12/Apr/14 Updated: 18/Jun/14 Resolved: 13/Apr/14
|Reporter:||Daniel Ziltener||Assignee:||Ambrose Bonnaire-Sergeant|
Clojure 1.6.0, core.typed 0.2.44
The error message is
The following is a minimal test case which fails:
It works, however, when calling (get-data in) instead of (.get-data in).
|Comment by Nicola Mometto [ 12/Apr/14 7:13 PM ]|
tools.analyzer.jvm returns a :host-interop node when, like in this case, it encounters an interop form of the form (.foo bar) and can't determine whether it's a no-arg method call or a field-access.
I don't know enough about core.typed internals but it looks like there should be an add-check-method for :host-interop that behaves like check methods for :instance-field/:instance-call that resolve to runtime reflection (not :validated)
|Comment by Ambrose Bonnaire-Sergeant [ 13/Apr/14 12:44 AM ]|
Thanks Daniel & Nicola, fixed https://github.com/clojure/core.typed/commit/fa22d52d8e9855ebbaf2593ec5e848ba714b25fc
|Comment by Daniel Ziltener [ 18/Jun/14 5:40 AM ]|
As of version 0.2.51, this still happens reliably.