[erlang-questions] Erlang/OTP R13A has been released

Kostis Sagonas <>
Wed Mar 18 14:29:22 CET 2009


Thorsten Schuett wrote:

> ... According to the docs, dialyzer supports two versions for specifying 
> defines "-Dname (or -Dname=value)". Unfortunately only the latter seems to 
> work:
>  ~/apps/otp-R13A/bin/dialyzer -Dtypes_are_builtin --src -c util.erl
> 
> dialyzer: Malformed define: {defines,[types_are_builtin]}

Just in case anybody wants a fix for the above, the following patch 
fixes the issue:

Kostis


Index: lib/dialyzer/src/dialyzer_cl_parse.erl
===================================================================
RCS file: /hipe/otp/lib/dialyzer/src/dialyzer_cl_parse.erl,v
retrieving revision 1.57
diff -u -w -r1.57 dialyzer_cl_parse.erl
--- lib/dialyzer/src/dialyzer_cl_parse.erl      10 Mar 2009 09:28:26 
-0000      1
.57
+++ lib/dialyzer/src/dialyzer_cl_parse.erl      18 Mar 2009 13:26:32 -0000
@@ -238,7 +238,7 @@
    {ok, ErlVal} = erl_parse:parse_term(Tokens),
    append_var(dialyzer_options_defines, [{list_to_atom(Def), ErlVal}]);
  append_defines([Def]) ->
-  append_var(dialyzer_options_defines, [list_to_atom(Def)]).
+  append_var(dialyzer_options_defines, [{list_to_atom(Def), true}]).

  append_include(Dir) ->
    append_var(dialyzer_include, [Dir]).



More information about the erlang-questions mailing list