Type checking question about Behaviours and Protocols

38 views
Skip to first unread message

michel perez

unread,
Aug 28, 2016, 11:12:56 AM8/28/16
to elixir-lang-talk
Is there a way in dialyzer to assert that receives a parameter with a module that implements a behaviour, or that receives a data that implements a given protocol?

Michał Muskała

unread,
Aug 28, 2016, 1:47:20 PM8/28/16
to elixir-l...@googlegroups.com

> On 28 Aug 2016, at 17:12, michel perez <michel....@gmail.com> wrote:
>
> Is there a way in dialyzer to assert that receives a parameter with a module that implements a behaviour, or that receives a data that implements a given protocol?
>

Unfortunately, the typespecs are not powerful enough to express such concepts.

Michał.

signature.asc
Reply all
Reply to author
Forward
0 new messages