Age | Commit message (Collapse) | Author |
|
1. Sometimes the solver forgot that a list had entered the error
state. The bug has been fixed by storing the atom 'error' in
MapDict. An example where the bug occurred is
io_lib_pretty:printable_bin(). The returned spec was weaker than it
should have been, but the fix-point loop hid the bug (in this case).
2. lists:partition() has been substituted for lists:splitwith() in
enumerate_constraints(). This fix together with 3. solves a
problem with long execution times for deeply nested fun:s. An
example which is now much faster is
lib/compiler/test/lc_SUITE:deeply_nested/1
(included as dialyzer/test/small_SUITE_data/src/deep_lc.erl).
3. The calculation of components in enumerate_constraints() has been
simplified and optimized. The important thing here is that _all_ of
the simple constraints have been saturated before entering the
complex part.
4. The pretty printing of constraints has been improved.
|
|
* sa/dialyzer-contract-variables:
Correct handling of type names in contracts
Don't rewrite unchanged PLT
Fix crash related to contract checking
OTP-10083
|
|
Variables in contracts can either be true type variables or simply names for
types thet are defined in the 'when' clauses. Consider the following example:
-spec foo(X, Options) -> {ok, X} | error when Options :: [{atom(), boolean()}].
Here X is a true variable whereas Options is a name for a type that is defined
in the when clause.
'when' clauses may further use names on the right side. These were not treated
properly by Dialyzer and could be generalized to the term() type. This patch
fixes this issue.
A further issue is the treatment of true type variables, but this is left for
another patch.
|
|
When "collapsing" heads of list elements from a list's tail into the list's
head the new head can be different.
|
|
When spawning OS (unix) processes with erlang:open_port, store the
resulting unix pid so that it can be queried later on using
erlang:port_info/1,2.
|
|
Depending of the ordering of the functions during dataflow, a
function with an infinite loop might be identified as one that
always crashes. This is fixed now, by allowing restoration of
the infinitely-looping status.
|
|
|
|
Dialyzer was not reporting unused functions with 0 arity. This was not
a real issue, until we found out that there could be cases where this
could lead to false warnings. This was the case in "no_local_return.erl".
|
|
Variable substitution was not generalizing any unknown variables.
|
|
Whenever a variable that could hold one of two or more possible closures was
used in a particular application, the application was assumed to fail if ONE of
the closures would fail in this application. This has been corrected to infer
failing application if ALL possible closures would fail in the particular
application.
|
|
|
|
* sa/dialyzer-dev:
Add origin information to #fun_var closures
Suppress some warnings about generation of non-returning funs
Enhance Dialyzer's inference on comparisons
Fix infinite loop in dataflow
Minor fix in dead code
Update r9c/{inets,mnesia} results in dialyzer's test suite
OTP-9529
|
|
* rz/add_proplist_type:
Add a proplist() type
OTP-9499
|
|
No warnings are emitted for funs that are non-returning when the
function that generates them has a contract that specifies that
it will return such a non-returning fun.
The actual bug, reported by Tuncer Ayaz and simplified by Maria
Christakis is included in Dialyzer's tests.
|
|
This patch makes Dialyzer aware of Erlang's total ordering of terms,
enabling discrepancy detection in cases where e.g. integer() < tuple()
is treated as a comparison that might also return false (when it is
certain to always return true).
|
|
|
|
* sa/dialyzer-server-loop-fix:
Fix server loop detection
OTP-9489
|
|
Fixed dialyzer warning occuring on binary comprehension of form
"<< <<>> || {A, B} <- [{a, b}] >>" caused by default clause
inserted by compiler. Since this clause is different from the
case of list comprehension, dialyzer fails to suppress that warning.
|
|
|
|
|
|
Recently I was adding specs to an API and found that there is
no canonical proplist() type defined.
|
|
Dialyzer does not normally emit warnings for functions that
implement non-terminating server loops. This detection failed
when some of the elements in an SCC terminated normally (being
for example list comprehensions or other generic anonymous
functions that were included in the SCC). This patch fixes that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|