<div dir="ltr">Currently, `-callback` declaration only affects how dialyzer works on the callback module. Those info are ignored in the behaviour module when a dynamic call is made: `HandlerMod:callback_fun()`. Right now, I am rewriting some behaviour specs and having dialyzer check the types would be great.<br><br>I can think of two ways to do this:<br><br>* Make dialyzer consider all dynamic calls in a module that declare `-callback` to be calls to the matching callback functions. I have no idea about dialyzer's internal though.<br>* Create a parse transform that is only called when using dialyzer. Each `-callback` will have a matching wrapper function e.g: `-callback foo(number()) -> ok` will generate `<div>`'$call_foo'(module(), number()) -> ok`. All dynamic calls (e.g: `HandlerMod:foo(42)`) will be rewritten to use those wrappers (`'$call_foo'(HandlerMod, 42)`). IIRC, there are ways to pass compiler options into dialyzer.<br><br>What are your thoughts?</div></div>