Age | Commit message (Collapse) | Author |
|
* 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.
|
|
|
|
|
|
The warning is about log_mf_h having a different spec for gen_event
callback init/1 than defined in gen_event.erl. log_mf_h allows return
value {error,Reason}, while gen_even only specifies successful return
values.
This commit add {error,Reason} as a valid return value to the
gen_event callback, since this is handled by the code.
|
|
Enable warnings by default, add two options for suppressing them,
fix warning formatting and update testsuites.
|
|
|
|
|
|
|
|
|
|
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.
|
|
Dialyzer emits warnings like the following "The specification for _
states that the function might also return _ but the inferred return
is _", which are actually underspecifications and not wrong type
specifications. This patch makes sure that they are filed under the
appropriate category.
|
|
* ta/typer-quote-atoms:
Update Dialyzer's reference results
Quote atoms if necessary in types
OTP-9560
|
|
|
|
|
|
* 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).
|
|
|
|
|
|
* hw/update-chmod-without-f:
Again: Call chmod without the "-f" flag
OTP-9491
|
|
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
Commit 7ed11a886fc8fcaf3c2b8324294e2f24e02b0f28 removed the "-f" flag
from chmod calls in Makefiles:
| "-f" is a non-standard chmod option which at least SGI IRIX and HP UX
| do not support. As the only effect of the "-f" flag is to suppress
| warning messages, it can be safely omitted.
Meanwhile, new "chmod -f" calls have been added. This commit removes the
"-f" flag from those new calls.
|
|
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.
|
|
|
|
|
|
|
|
|