Reputation:
I attempted to do:
(defprotocol TestP
(fun [this ^int i]))
(deftype Test [] TestP
(fun [this ^int i] i))
However, compilation fails and says Can't find matching method: fun
. Does that mean deftype functions may not accept type hints on parameters?
Upvotes: 2
Views: 323
Reputation: 33637
You don't need to specify the type hint in deftype
as the error message clearly states:
Can't find matching method: fun, leave off hints for auto match.
Upvotes: 2