[erlang-bugs] Dialyzer and os:version

Mickaël Rémond mickael.remond@REDACTED
Thu Jul 26 12:06:16 CEST 2007


Hello,

Dialyzer issues a warning when matching the result of os:version:

	    OSVersion = case os:version() of
			    {Major, Minor, Release} ->
				lists:flatten(
				  io_lib:format("~w.~w.~w",
						[Major, Minor, Release]));
			    VersionString ->
				VersionString
			end,

Dialyzer says on this code:
The variable VersionString can never match since previous clauses  
completely covered the type {non_neg_integer(),non_neg_integer 
(),non_neg_integer()}

However, the documentation of os.erl says:
version() -> {Major, Minor, Release} | VersionString

Dialyzer or the documentation has it wrong. This is on Erlang R11B-5.

-- 
Mickaël Rémond
  http://www.process-one.net/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20070726/e6ff8c22/attachment.htm>


More information about the erlang-bugs mailing list