Dialyzer doesn't like calls to functions in the base module. Is there a dialyzer flag to skip this error or am I doing some wrong.

Here is a similar code:

-module(base).
-export(foo/1).

foo(X) -> X*2.


-module(derived).
-extends(base).
-export(xyz/0).

xyz() -> 
    ?MODULE:foo(5).

This piece of code works as I expect it to work. My only concern is the dialyzer warning;

---.erl:41: Call to missing or unexported function ---:---/3

Am I doing something wrong or is it dialyzer giving an unnecessary warning ?

有帮助吗?

解决方案

Dialyzer does not support extended modules, neither are there plans for such an extension. To the best of my knowledge, module inheritance is not even an official feature of Erlang.

Sorry...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top