Dialyzer and parameterized modules

Brentley Jones the.ajarn@REDACTED
Sun Jun 14 17:26:51 CEST 2009


Hello,

When using Dialyzer with parameterized module, it complains that it's  
not an atom() to the left of the ':'. It simply doesn't have it's  
definition of module() updated to include the current instanced modules.

param_user.erl:5: Function test/0 has no local return
param_user.erl:7: The call P:'test'([32 | 33 | 72 | 100 | 101 | 108 |  
111 | 114 | 119,...]) requires that P is of type atom() not  
{'parameter',_}

With the following code:

%% parameter.erl
-module(parameter, [X]).

-export([test/1]).

test(Message) ->
     io:format("~p: ~p~n", [X, Message]).


%% param_user.erl
-module(param_user).

-export([test/0]).

test() ->
     P = parameter:new(bob),
     P:test("Hello world!").


More information about the erlang-bugs mailing list