سؤال

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