dialyzer bug?

Bjorn Gustavsson <>
Thu Apr 14 12:01:57 CEST 2005


Samuel Rivas <> writes:
[...]
> 
> Aside, experimenting with the compiler I found out that expressions like 
> a/b, a+b, ... generate a warning, but expressions like A/b don't. I
> suppose it would be wise to warn in all these cases.

The compiler only warns when it finds obvious discrepancies when trying
to optimize the code. Arithmetic expressions involving a variable cannot
(in general) be optimized, so no warnings are generated.

A future version of the compiler will probably do more type analysis and
will generate more warnings (and optimize the code better based on the
type analysis).

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list