Age | Commit message (Collapse) | Author |
|
The tests cannot be handled by earlier versions of Dialyzer.
|
|
In particular fix handling of records.
|
|
|
|
It is allowed in Erlang/OTP 17 to redefine the map() types. However,
Dialyzer did not handle local map() types correctly.
|
|
The -dialyzer() attribute can be used for suppressing warnings in a
module by specifying functions or warning options. It can also be used
for requesting warnings in a module.
|
|
|
|
* maint:
dialyzer: correct record updates
|
|
Correct a bug introduced in commit 8498a3.
|
|
* maint:
dialyzer, hipe: Fix a bug concerning is_record/2,3
|
|
Also fixed some cases where Dialyzer could crash due to reaching
system limits.
|
|
* maint:
hipe: Correct pretty-printing of bitstrings
|
|
|
|
* maint:
[dialyzer] Correct a doc bug introduced in 0b041238
[dialyzer] Use the option 'dialyzer' to control the compiler
[dialyzer] Fix handling of literal records
|
|
This ticket is about records in Erlang code, and when to check the
fields against the (optional) types given when defining records.
Dialyzer operates on the Erlang Core format, where there are no trace
of records. The fix implemented is a Real Hack:
Given the new option 'dialyzer' erl_expand_records marks the line
number of records in a way that is undone by v3_core, which in turn
inserts annotations that can be recognized by Dialyzer.
|
|
|
|
* egil/fix-maps-pretty-layout/OTP-11947:
dialyzer: Add Maps type mismatch test
hipe,compiler: Fix Map literals pretty printing
|
|
* maint:
hipe: fix a bug concerning typed record fields
|
|
|
|
* maint:
hipe: fix a bug concerning typed record fields
|
|
When checking typed record fields Dialyzer failed to handle
types containing remote types.
Thanks to Erik Søe Sørensen for reporting this bug.
|
|
The pre-defined types array(), dict(), digraph(), gb_set(), gb_tree(),
queue(), set(), and tid() have been removed.
|
|
|
|
|
|
Dialyzer sometimes output warnings like
Attempt to test for inequality between a term of type 'false' and a
term of opaque type 'false' | gb_set()
The reason was that erl_types:t_inf/3 when called from
erl_types:t_find_unknown_opaque() did not return 'false' but found the
mismatch. It should not return the mismatch unless the intersection is
empty ('none').
Thanks to Shayan Pooya [[email protected]] for pointing out the bug.
|
|
Two steps are needed to make this work:
1) Avoid generating the additional "apply_constraint" in dialyzer_typesig by
reporting every function argument as a potential external function (patch on
dialyzer_dep).
This will produce correct success typings for all functions in the test case,
but dataflow would miss the key warnings that help identify the bugs.
2) Patch dialyzer_dataflow so that it uses the "handle just external" path as a
fallback whenever there are any external calls. As a result, if we have info
about some paths, then:
a) use the old "handle known apply" code to mark these functions as used and
b) ignore the generalized result and use the one found by typesig for the
return value of the apply itself.
|
|
* aronisstav/hipe/opaque_fix:
Don't 'opaque-decorate' a success typing using an incompatible spec
|
|
Without this patch Dialyzer crashes when analyzing the supplemented test case.
|
|
|
|
Guard constraints used to be limited to a certain depth, which handled
mutually depending constraints safely, but also sometimes introduced
unnecessary generalizations.
This patch puts no explicit limit upon guard constraints (other than
those that already exist in erl_types), but breaks cycles by replacing
variables with the any() type.
In some cases the old method resulted in more warnings, but since the
limit was quite arbitrary and mutually depending guard constraints are
(very) rare, the new method should been seen as an improvement since
it handles cases that used to make Dialyzer loop or miss warnings.
|
|
|
|
* hb/dialyzer/fix_on_load/OTP-11743:
FIx handling of 'on_load' attribute
|
|
[pull request from Kostis Sagonas]
The handling of functions appearing in an 'on_load' attribute was wrong.
Instead of considering the functions specified in these attributes as
escaping from the module and performing a full analysis starting from
them, the code just bypassed this analysis and only suppressed unused
warning messages for these functions. This worked for most of the cases
but resulted in functions (directly or indirectly) called by 'on_load'
functions being reported as not called by the module.
Such a case existed in the code of the 'crypto' application.
To solve these issues the initialization code for functions escaping
from the module was changed and the test for the on_load functionality
was appropriately extended.
|
|
The types array(), dict(), digraph(), gb_set(), gb_tree(), queue(),
set(), and tid() have been deprecated. They will be removed in OTP 18.0.
Instead the types array:array(), dict:dict(), digraph:graph(),
gb_set:set(), gb_tree:tree(), queue:queue(), sets:set(), and ets:tid()
can be used. (Note: it has always been necessary to use ets:tid().)
It is allowed in OTP 17.0 to locally re-define the types array(), dict(),
and so on.
New types array:array/1, dict:dict/2, gb_sets:set/1, gb_trees:tree/2,
queue:queue/1, and sets:set/1 have been added.
|
|
|
|
|
|
|
|
Hans Bolider reported a dialyzer crash when using a remote type in
the tail position of a maybe_improper_list() declaration. A test
was created (by extending an existing module of the testsuite)
and erl_types was modified to expand the remote type and not pass
it unexpanded to subsequent phases in the processing.
|
|
|
|
|
|
|
|
|
|
|
|
This changed the lines so the results now differ.
|
|
It makes no sense to be able to do `<<...,Rest/binary>> <= ...` in a
comprehension. The related Dialyzer test is removed.
|
|
|
|
Dialyzer was constraining bitstring data used in the construction of other
bitstring values too much. These constraints have now been relaxed.
|
|
|
|
* 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.
|