Have you seen Does dialyzer check behaviours and callbacks?
It seems
- Direct calls to
MyLister.list_something
don’t to have to honour the constraints of the behaviour. - When
list_something
is called in the context of the behaviour Dialyzer may not be able to infer that it’sMyLister
's function in particular. - If static analysis can infer that
MyLister.list_something
is being called in the context of the behaviour then you should be seeing an"The inferred return type ... has nothing in common with ..."
error.