Age | Commit message (Collapse) | Author |
|
|
|
* sa/dialyzer-unknown-arity-funs/OTP-10772:
Update one more unused funs result as per ffe582b
Remove pubsub and comm_layer tests from testsuite
Properly support functions with arbitrary arity in type specs.
Conflicts:
lib/hipe/cerl/erl_types.erl
|
|
|
|
These tests recently broke because of the deprecation of the package system.
Furthermore, they included copyrighted code.
Finally they were not minimized not targeted to any specific feature and had no
warnings being reported.
|
|
Dialyzer now understands the "fun(...)" syntax in type specs.
|
|
|
|
* sa/dialyzer-list-spec/OTP-10740:
Report spec discrepancy on mismatching lists
Properly support functions with arbitrary arity in type specs.
Conflicts:
lib/dialyzer/test/small_SUITE_data/results/empty_list_infimum
|
|
|
|
|
|
* sa/dialyzer-list-spec/OTP-10740:
Report spec discrepancy on mismatching lists
|
|
* sa/dialyzer-record-field-type/OTP-10681:
Fix precision of record creation violation warnings
|
|
|
|
|
|
This patch enables Dialyzer to detect cases where a function has a specification
for a return type containing some list with elements different than the ones
Dialyzer's own algorithm can infer e.g. a function specified to return [atom()]
when actually [[atom()]] is returned.
Previously Dialyzer remained silent, under normal operation, seeing that these
two types have the empty list as a common element, so they were not 'completely
irrelevant'.
|
|
Before patch Dialyzer was reporting all the fields that were not subtypes
of the declared ones as incorrect. The correct violations are for the fields
whose intersection with the declared ones is empty.
|
|
|
|
Originally reported by Joseph Wayne Norton, simplified testcase provided by Hans
Bolinder.
|
|
Dialyzer no longer outputs warnings for unused anonymous functions
("funs"). Warnings are still output for unused functions.
Funs in functions with -nowarn_unused_function attributes generated
warnings for unused functions. Unused list comprehensions also
generated warnings for unused funs.
|
|
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.
|
|
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).
|
|
|
|
* 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.
|
|
|
|
|
|
|
|
|
|
|