aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer
AgeCommit message (Collapse)Author
2016-12-07Update copyright-yearErlang/OTP
2016-11-22dialyzer: Substitute 'opacity' for 'opaqueness'Hans Bolinder
Suggested by Kostis.
2016-11-22dialyzer: Improve a warning messageHans Bolinder
Messages regarding guards with orelse/andalso could look like "Clause guard cannot succeed. The variable A was matched against the type any()". Now they look like as if or/and is used: "Guard test is_integer(A::atom()) can never succeed".
2016-11-22dialyzer: Improve a warning messageHans Bolinder
Messages like "Invalid type specification for function para3:exp_adt/0. The success typing is () -> 3" now look like "The specification for para3:exp_adt/0 has an opaque subtype para3_adt:exp1(para3_adt:exp2()) which is violated by the success typing () -> 3". The old message did not give any clue as to what invalidated the contract, namely the opaque subtype.
2016-11-22dialyzer: Correct a warnings messageHans Bolinder
Messages like "The attempt to match a term of type rec_api:f() against the variable _ breaks the opaqueness of rec_adt:f()" now look like "The attempt to match a term of type rec_adt:f() against the record field 'f' with type rec_api:f() breaks the opaqueness of the term".
2016-11-01erts: Correct type declaration of match specification headHans Bolinder
Bug reported by Peti Gömöri <[email protected]>.
2016-10-21dialyzer: Fix error handling of bad -dialyzer() attributesHans Bolinder
If a dialyzer module attribute references an undefined (local) function an error tuple is thrown but no caught. This leads to a 'nocatch' error and not the intended "clean" error.
2016-10-13Merge branch 'hasse/dialyzer/fix_opaque_bugs/OTP-13693' into maintHans Bolinder
* hasse/dialyzer/fix_opaque_bugs/OTP-13693: dialyzer: Fix opaque bug dialyzer: Fix opaque bugs
2016-10-11Update Dialyzer documentationxsipewe
Language cleaned up by the technical writer xsipewe from Combitech. Proofreading and corrections by Hans Bolinder.
2016-10-06dialyzer: Fix opaque bugHans Bolinder
The "decoration" of opaque types works better than before when opaque types are used by other opaque types.
2016-10-06dialyzer: Fix opaque bugsHans Bolinder
t_from_form() sometimes returned a more general type than it should have done due to a bug in from_form_loop(): it stopped when the limit was exceeded, which could mean a collapsed type. Returning a type with smaller depth should fix this. is_specialization() now handles opaque types before unions, which should fix another problem. The bugs reported by Kostis.
2016-09-20Prepare releaseErlang/OTP
2016-09-12Merge branch 'margnus1/dialyzer/fix_maps_opaque/ERL-249/PR-1161/OTP-13878' ↵Hans Bolinder
into maint * margnus1/dialyzer/fix_maps_opaque/ERL-249/PR-1161/OTP-13878: erl_bif_types: Properly unopaque maps:merge/2 args
2016-09-07erl_bif_types: Properly unopaque maps:merge/2 argsMagnus Lång
erl_bif_types:type/5 was calling erl_types:map_pairwise_merge/3 directly with its (potentially opaque) arguments, causing Dialyzer crashes. Bug (ERL-249) reported and minimised test case provided by Felipe Ripoll.
2016-08-31dialyzer: Increase time limit of suitesHans Bolinder
The test 'proper' takes some time.
2016-08-31dialyzer: Remove a check that always failsHans Bolinder
2016-07-26Improve format_warning/1 specBrujo Benavides
Let it handle `dial_warning()` input as well, to match what `format_warning/2` expects.
2016-07-04dialyzer: Suppress warns on generated case stmtsMagnus Lång
Warnings about clauses that cannot match and are also compiler generated are suppressed unless none of the clauses return. This feature is useful for non-Erlang BEAM languages (such as Elixir) that compile to Erlang and expand certain language constructs into case statements. In that case, as long as the language construct can succeed, these warnings are undesired and appear spurious to users that do not check the Erlang code that their program expands into. Thanks to José Valim for the test (slightly modified).
2016-06-29Update release notesErlang/OTP
2016-06-29Update version numbersErlang/OTP
2016-06-28erl_types: Normalise X:=none() pairs in t_map/3Magnus Lång
t_map/3 previously required callers to perform this normalisation, but as t_from_form/5 would sometimes fail to do so, this requirement is relaxed. Bug (ERL-177) reported and shrunk by Luke Imhoff.
2016-06-21Prepare releaseErlang/OTP
2016-06-10Merge branch 'hasse/dialyzer/improve_from_form/OTP-13547'Hans Bolinder
* hasse/dialyzer/improve_from_form/OTP-13547: Update primary bootstrap stdlib: Correct types and specs dialyzer: Minor adjustments dialyzer: Suppress unmatched_return for send/2 dialyzer: Improve the translation of forms to types dialyzer: Use a cache when translating forms to types dialyzer: Prepare erl_types:t_from_form() for a cache dialyzer: Optimize erl_types:t_form_form() dialyzer: Correct types syntax_tools: Correct types erts: Correct character repr in doc of the abstract format stdlib: Correct types and specs
2016-06-09Remove support for '...' in Maps typesHans Bolinder
It is possible that '...' is added later (OTP 20.0), but for now we are not sure of all details.
2016-06-09dialyzer: Minor adjustmentsHans Bolinder
2016-06-09dialyzer: Suppress unmatched_return for send/2Hans Bolinder
2016-06-09dialyzer: Use a cache when translating forms to typesHans Bolinder
2016-06-09dialyzer: Correct typesHans Bolinder
2016-06-09Merge branch 'stavros/dialyzer/fix_call_site_analysis/OTP-13655/PR-1092'Hans Bolinder
* stavros/dialyzer/fix_call_site_analysis/OTP-13655/PR-1092: Fix a bug in Dialyzer related to call-site analysis
2016-06-08Fix a bug in Dialyzer related to call-site analysisStavros Aronis
Dialyzer's "dataflow" module is using information from the callgraph to determine which functions may be called at a particular call-site. Unfortunately this information can include functions that are certainly not among the possible choices. We don't want to emit warnings in such cases, so a "reasonable" compromise is to stay silent if there are many possible funs and at least one of them can succeed. Bug reported by Dan Gudmundsson, test shrunk down by Magnus Lång.
2016-06-08Dialyzer: Fix a bug that caused Dialyzer to go into an infinite loop.Hans Bolinder
Dialyzer failed to remove all loops among constraints.
2016-06-02Revert "Prepare release"Erlang/OTP
This reverts commit e020f75c10410a6943cd055bfa072a2641eab7da.
2016-06-02Prepare releaseErlang/OTP
2016-05-16Merge branch 'kostis/dialyzer/opaque_type/OTP-13586/PR-1047'Hans Bolinder
* kostis/dialyzer/opaque_type/OTP-13586/PR-1047: Declare the erl_types:var_table() type as opaque
2016-05-13Update application versionsHans Bolinder
2016-05-13Use the newly defined types in a record declarationKostis Sagonas
2016-05-13Strengthen the spec of analyze/1Kostis Sagonas
2016-05-13Fix dependency calculation when encountering an erroneous 'apply'Kostis Sagonas
Dialyzer's dependency calculation was throwing an error when encountering an 'apply' node with something that was not a variable (e.g., a literal). The rest of the code did not know what to do with this error, which resulted in dialyzer crashing. Fix this by ingoring the detected error in the dependency calculation phase; later dialyzer passes know how to properly handle and report this kind of errors anyway. This fixes [Erlang-JIRA] (ERL-138).
2016-05-12Revert "Prepare release"Erlang/OTP
This reverts commit bd64ad8e15d66e48b36dbe3584315dd5cfc8b59a.
2016-05-11Prepare releaseErlang/OTP
2016-05-04Declare the erl_types:var_table() type as opaqueKostis Sagonas
and do the following changes: in erl_types: export the type and an appropriate constructor for it in dialyzer_contracts: perform all necessary code modifications to fix all dialyzer warnings Although no warnings are reported by dialyzer, it's quite possible that these are not the only places where the opacity of the var_table() data structure is violated. But I decided to leave these places for a better version of dialyzer to discover...
2016-05-04dialyzer: Update runtime dependenciesHans Bolinder
2016-05-04dialyzer: Use maps instead of dictHans Bolinder
Optimization: A few dictionaries are maps instead of dicts.
2016-05-04dialyzer: Optimize the evaluation of SCC:s in module typesigHans Bolinder
The evaluation of a single SCC has been optimized. The parallelism when evaluating a single SCC has been removed.
2016-05-04Merge branch 'experimental/correct_dialyzer_spelling/PR-1007/OTP-13544'Hans Bolinder
* experimental/correct_dialyzer_spelling/PR-1007/OTP-13544: Correct mispelling in Dialyzer's acronym definition
2016-04-29dialyzer: Fix a bug in the translation of forms to typesHans Bolinder
A bug is fixed, but there are more problems. Modify erl_types.erl like this: -define(EXPAND_LIMIT, 500). and bogus warnings are output (again). Callbacks and specs are compared (subtype) in dialyzer_behaviour. If they are expanded to different depths, then invalid warnings can be generated.
2016-04-28erl_types: Don't consider opaque keys singletonMagnus Lång
Opaque singleton keys have the unfortunate property, unlike any other singleton type, to overlap with other singleton types that do not have the same internal representation. Therefore, we must not keep opaque singletons in the Pairs list in a map type.
2016-04-28erl_types: Fix t_subtract/2 correctness bugMagnus Lång
t_subtract/2 would break its postcondition by always returning the underapproximation none() when given a variable on the right hand side. This broke map type parsing, since it relied on t_subtract/2 to tell it when map keys would shadow each other.
2016-04-28erl_types: Fix crash merging maps with opaque keysMagnus Lång
Opaque keys in maps broke an assumption in erl_types:mapmerge_otherv/3 (that the infinimum of a singleton type and some other type would either be none() or that same singleton type), causing a case_clause crash.
2016-04-28dialyzer_typesig: Fix bad external typeMagnus Lång
28a4a5057ab9 mistakenly used the non-existing type cerl:tree() instead of cerl:cerl().