[erlang-questions] Erlang 17 issue with dialyzer and nowarn_deprecated_type

Kenji Rikitake <>
Sat Apr 12 03:16:13 CEST 2014


See OTP-10342 at http://www.erlang.org/download/otp_src_17.0.readme.

Quote:

A compiler option, nowarn_deprecated_type, has been
introduced. By including the attribute

-compile(nowarn_deprecated_type).

in an Erlang source file, warnings about deprecated types can
be avoided in Erlang/OTP 17.0.

The option can also be given as a compiler flag:

erlc +nowarn_deprecated_type file.erl

Unquote.

Kenji Rikitake

++> Shayan Pooya <> [2014-04-11 10:03:05 -0400]:
> Date: Fri, 11 Apr 2014 10:03:05 -0400
> From: Shayan Pooya <>
> To: "" <>
> Subject: [erlang-questions] Erlang 17 issue with dialyzer and
>  nowarn_deprecated_type
> 
> Hello,
> 
> In order to make Disco compile with Erlang 17 without warnings, I added
> nowarn_deprecated_type to silence the warnings.  However, after doing so,
> dialyzer fails with the following error:
> 
> ddfs_master.erl:345: Attempt to test for inequality between a term of type
> 'false' and a term of opaque type 'false' | gb_set()
> 
> 
> (
> https://github.com/discoproject/disco/blob/develop/master/src/ddfs/ddfs_master.erl#L345
> )
> 
> 
> Oddly enough, a simple s/gb_set()/gb_sets:gb_set()/g in this file fixes
> this issue but I do not want to do that since it breaks the builds for
> older versions (and that's the reason nowarn_deprecated_type has been
> added).
> 
> Any suggestions?  The error message itself does not make much sense to me.
> 
> Regards.

> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list