aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data
AgeCommit message (Collapse)Author
2016-02-09dialyzer: Correct byte_size() and comparisonsHans Bolinder
The argument of byte_size() is a bitstring(). The code in erl_bif_types that finds cases where comparisons always return true or false is corrected when it comes to maps and bit strings.
2016-01-14dialyzer: Update Maps testsBjörn-Egil Dahlberg
2015-10-27Teach Dialyzer call to funs `M:F/A` (literal M, F, A)Luca Favatella
2015-10-27Merge branch 'lucafavatella/dialyzer-fun-literal-arity' into maintHenrik Nord
* lucafavatella/dialyzer-fun-literal-arity: Teach Dialyzer arity of funs with literal arity OTP-13068
2015-09-04dialyzer: Fix erlang:abs/1Hans Bolinder
Fix the range type of erlang:abs/1.
2015-08-21hipe/dialyzer: Fix a bug concerning opaque types and keydelete/3Hans Bolinder
Thanks to ILYA Khlopotov for pointing the bug out.
2015-07-11Teach Dialyzer arity of funs with literal arityLuca Favatella
Re-insert logic for `erlang:make_fun/3` in `erl_bif_types`. It had been removed in bd941f5 while type spec-ing `erlang.erl`. Type spec in `erlang.erl` cannot express arity of returned fun based on value of argument hence re-introducing logic in `erl_bif_types`. Re-definition of logic in `erl_bif_types` follows approach in 9d870a0.
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-15dialyzer: Fix a bug in the expansion of formsHans Bolinder
The check that a modified type of a field is a subtype of the declared type has been moved outside of the expansion of forms to avoid loops.
2015-05-08Merge branch 'aronisstav/dialyzer-inv-mult'Zandra Hird
* aronisstav/dialyzer-inv-mult: Fix a bug related to constraints generated for erlang:'*'/2 OTP-12725
2015-05-05Fix a bug related to constraints generated for erlang:'*'/2Stavros Aronis
For Rst = A1 * A2, typesig for erlang:'*'/2 was constraining the arguments A1 and A2 in the 'reverse' direction by requiring that A2 is a subtype of Rst div A1, unless A1 is a hard zero. This is not correct: if for example both Rst and A1 are non_negative, such a constraint will first force A1 to be non-zero for the division to go through and then require A2 to be non_negative as non_negative div positive = non_negative, always (see commited test). In the fixed version, we are not constraining an argument if the other operand *may* be zero.
2015-04-30dialyzer: Strengthen maps testsBjörn-Egil Dahlberg
2015-04-27dialyzer: Add new option 'unknown'Hans Bolinder
Replace the undocumented option 'no_unknown' with the documented option 'unknown'.
2015-04-27dialyzer: Add new option 'no_missing_calls'Hans Bolinder
2015-03-10[dialyzer] Add testcasesHans Bolinder
The tests cannot be handled by earlier versions of Dialyzer.
2015-03-10[dialyzer] Fix the conversion of forms to typesHans Bolinder
In particular fix handling of records.
2015-02-12[dialyzer] Fix a bug concerning map() typesHans Bolinder
2015-02-10[dialyzer] Fix a bug concerning map() typesHans Bolinder
It is allowed in Erlang/OTP 17 to redefine the map() types. However, Dialyzer did not handle local map() types correctly.
2015-01-14dialyzer: Introduce module local suppression of warningsHans Bolinder
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.
2014-12-01dialyzer: Test recoalesced map keysBjörn-Egil Dahlberg
2014-11-25Merge branch 'maint'Hans Bolinder
* maint: dialyzer: correct record updates
2014-11-24dialyzer: correct record updatesHans Bolinder
Correct a bug introduced in commit 8498a3.
2014-08-21Merge branch 'maint'Hans Bolinder
* maint: dialyzer, hipe: Fix a bug concerning is_record/2,3
2014-08-21dialyzer, hipe: Fix a bug concerning is_record/2,3Hans Bolinder
Also fixed some cases where Dialyzer could crash due to reaching system limits.
2014-06-30Merge branch 'maint'Hans Bolinder
* maint: hipe: Correct pretty-printing of bitstrings
2014-06-26hipe: Correct pretty-printing of bitstringsHans Bolinder
2014-06-17Merge branch 'maint'Hans Bolinder
* maint: [dialyzer] Correct a doc bug introduced in 0b041238 [dialyzer] Use the option 'dialyzer' to control the compiler [dialyzer] Fix handling of literal records
2014-06-17[dialyzer] Fix handling of literal recordsHans Bolinder
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.
2014-05-26Merge branch 'maint'Björn-Egil Dahlberg
2014-05-26Merge branch 'egil/fix-maps-pretty-layout/OTP-11947' into maintBjörn-Egil Dahlberg
* egil/fix-maps-pretty-layout/OTP-11947: dialyzer: Add Maps type mismatch test hipe,compiler: Fix Map literals pretty printing
2014-05-26Merge branch 'maint'Hans Bolinder
* maint: hipe: fix a bug concerning typed record fields
2014-05-23hipe: fix a bug concerning typed record fieldsHans Bolinder
2014-05-13Merge branch 'maint'Hans Bolinder
* maint: hipe: fix a bug concerning typed record fields
2014-05-13hipe: fix a bug concerning typed record fieldsHans Bolinder
When checking typed record fields Dialyzer failed to handle types containing remote types. Thanks to Erik Søe Sørensen for reporting this bug.
2014-05-05Remove pre-defined types dict(), digraph(), &cHans Bolinder
The pre-defined types array(), dict(), digraph(), gb_set(), gb_tree(), queue(), set(), and tid() have been removed.
2014-04-29dialyzer: Add Maps type mismatch testBjörn-Egil Dahlberg
2014-04-28Introduce the attribute -optional_callbacks in the context of behavioursHans Bolinder
2014-04-17hipe, dialyzer: Fix a bug concerning opaque typesHans Bolinder
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.
2014-03-28Dialyzer now plays nicely with funs that come as "external" argumentsStavros Aronis
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.
2014-03-26Merge branch 'aronisstav/hipe/opaque_fix'Hans Bolinder
* aronisstav/hipe/opaque_fix: Don't 'opaque-decorate' a success typing using an incompatible spec
2014-03-24Don't 'opaque-decorate' a success typing using an incompatible specStavros Aronis
Without this patch Dialyzer crashes when analyzing the supplemented test case.
2014-03-24stdlib: warn if the type map() is redefinedHans Bolinder
2014-03-21dialyzer: generalize guard constraints in a new wayHans Bolinder
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.
2014-03-20Introduce a new warning option, 'no_unknown'Hans Bolinder
Not (yet) documented.
2014-03-04Improve message about deprecated built-in typesHans Bolinder
2014-02-24Merge branch 'hb/dialyzer/fix_on_load/OTP-11743'Hans Bolinder
* hb/dialyzer/fix_on_load/OTP-11743: FIx handling of 'on_load' attribute
2014-02-24FIx handling of 'on_load' attributeHans Bolinder
[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.
2014-02-23Deprecate pre-defined built-in typesHans Bolinder
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.
2014-02-22Introduce parameterized opaque typesHans Bolinder
Handle immediate opaque types as aliases: A declaration of dict/0 -opaque dict() :: dict(_, _). -opaque dict(Key, Value) :: ... is handled as an alias, that is, when using dict() it is immediately replaced by dict(_, _). This is a means to avoid having to handle equivalent opaque types later. To be changed if it doesn't work well.
2014-01-29dialyzer: Add maps testsBjörn-Egil Dahlberg