[CTYP-45] Confusing error message when using clojure.core/defprotocol instead of clojure.core.typed/defprotocol> Created: 04/Sep/13 Updated: 25/Sep/13 Resolved: 08/Sep/13
|Reporter:||Timo Mihaljov||Assignee:||Ambrose Bonnaire-Sergeant|
Clojure 1.5, core.typed 0.2.2
Type checking a namespace using clojure.core/defprotocol instead of clojure.core.typed/defprotocol> results in the following error:
Here's a minimal project demonstrating the problem: https://github.com/noidi/core.typed-record-problem
Although the user guide mentions defprotocol>, it's very easy to run into this error by accident, and the error message does not give the user any hints as to what might be wrong. In the long term it would be best if core.typed could deal with clojure.core/defprotocol. As a stopgap measure, maybe core.typed could detect this error and instruct the user to use clojure.core.typed/defprotocol> instead?
|Comment by Ambrose Bonnaire-Sergeant [ 08/Sep/13 6:05 AM ]|
The first error is now about the protocol var being unannotated, which I'm happy enough should give people hints as to how to fix the error.