aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data
AgeCommit message (Collapse)Author
2019-06-04dialyzer: Correct indentation of field warningsHans Bolinder
See also https://bugs.erlang.org/browse/ERL-953.
2019-05-07Merge branch 'hasse/dialyzer/prettier_warnings/OTP-15135'Hans Bolinder
* hasse/dialyzer/prettier_warnings/OTP-15135: dialyzer: Remove quotes around operators dialyzer: Add test cases with indentation dialyzer: Add an --no_indentation option dialyzer: Add parentheses around annotated union elements dialyzer: Fix dialyzer_dataflow:format_args_1()
2019-05-07dialyzer: Remove quotes around operatorsHans Bolinder
2019-05-07dialyzer: Add test cases with indentationHans Bolinder
A smallish selection of already existing tests, run with the indentation option.
2019-05-03stdlib: Do not allow specs for functions in other modulesHans Bolinder
See also https://bugs.erlang.org/browse/ERL-845. [Kostis:] My suggestion is that the compiler refuses to compile modules that contain specs for functions that are not from this module. I do not remember when / why this `feature' was introduced, but thinking about it I see a lot of (ugly) semantics issues with it. For example, should one be allowed to declare in the foo module that lists:flatten/1 takes an integer() as an argument and returns a binary()? Should one be allowed to declare a spec in some module m1 for a function of m2 that is not defined in m2? There are all kinds of checks that will need to be added to dialyzer to protect itself from these semantics issues. The compiler already refuses to compile modules that contain specs for non-existing functions of the module. Similarly, it should refuse to compile modules that contain specs for functions of other modules - unless it can somehow check that these functions are indeed defined, but it is not how the compiler currently works.
2019-04-29dialyzer: Add parentheses around annotated union elementsHans Bolinder
In contracts, annotated elements of unions are printed with parentheses around them. They are not parseable otherwise.
2019-04-29dialyzer: Fix dialyzer_dataflow:format_args_1()Hans Bolinder
2019-04-24dialyzer: Improve the warning tagged 'fun_app_args'Hans Bolinder
The mismatching argument positions are included.
2019-04-08dialyzer: Fix pretty printing of binariesHans Bolinder
Notice the comment in dialyzer_utils: %% Copied from core_pp. The function cerl:binary_segments/2 should/could %% be extended to handle literals, but then the cerl module cannot be %% HiPE-compiled as of Erlang/OTP 22.0 (due to <<I:N>>). When at it: simplify some common cases like "/binary-unit:8".
2019-02-25Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Fix maps as parameter of opaque types dialyzer: Fix key check of lists:key{search,member,find}()
2019-02-21dialyzer: Fix key check of lists:key{search,member,find}()Hans Bolinder
Replace integers and floats with t_number() since keysearch et al compare the key (rather than match). Corrects the commit b3c8e94.
2019-02-19Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Fix a bug regarding contracts
2019-02-19Merge branch 'hasse/dialyzer/fix_contract_check/OTP-15562/ERL-845' into maintHans Bolinder
* hasse/dialyzer/fix_contract_check/OTP-15562/ERL-845: dialyzer: Fix a bug regarding contracts
2019-02-11Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Fix a bug affecting keyfind/keysearch/keymember
2019-02-08dialyzer: Fix a bug affecting keyfind/keysearch/keymemberHans Bolinder
2019-02-06dialyzer: Fix a bug regarding contractsHans Bolinder
See also https://bugs.erlang.org/browse/ERL-845. Fix a bug that caused Dialyzer to crash when analyzing a contract with a module name differing from the analyzed module's name. The bug was introduced in Erlang/OTP 18.
2018-08-31Merge pull request #1944 from ↵Hans Bolinder
uabboli/hasse/dialyzer/improve_guards/OTP-15268/ERL-680 dialyzer: Improve handling of complex guards
2018-08-28dialyzer: Improve handling of complex guardsHans Bolinder
See also https://bugs.erlang.org/browse/ERL-680. The right associative short circuit expressions 'andalso' and 'orelse' are expanded by the Compiler (see v3_core) into 'case' expressions. If parentheses are used to enforce left associativeness, variables are introduced, and the time needed by Dialyzer increases exponentially. Rather than trying to fix Dialyzer itself, v3_core now rewrites repeated use of 'andalso' ('orelse') into right associative expressions before creating the 'case' expressions.
2018-07-23Refine types of functions in maps moduleMichał Muskała
This only touches functions that are not further manually enhanced in erl_bif_types. The hope is that this will allow dialyzer to discover more issues in code using maps.
2018-05-13dialyzer: Do not emit warnings for unreachable funsHans Bolinder
Warnings are not generated for funs residing in dead code. In particular, warnings like "The created fun has no local return" are no longer generated for funs declared in clauses or functions that cannot be run.
2018-03-24Avoid overflowing the atom tableBjörn Gustavsson
Use integer variable names instead of atoms in v3_core, sys_core_fold, and v3_kernel to avoid overflowing the atom table. It is a deliberate design decision to calculate the first free integer variable name (in sys_core_fold and v3_kernel) instead of somehow passing it from one pass to another. I don't want that kind of dependency between compiler passes. Also note that the next free variable name is not easily available after running the inliner.
2018-02-20Dialyzer should not throw away spec information because of overspecRichard Carlsson
2018-02-15Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Fix a crash
2018-02-14dialyzer: Fix a crashHans Bolinder
2018-02-06dialyzer: Assign a type to the primop build_stacktraceHans Bolinder
2018-01-19Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Fix bsl/2 bug
2018-01-12dialyzer: Fix bsl/2 bugHans Bolinder
Also modified erl_bif_types:infinity_bsl() when called with zero as first argument. As of writing this, erlang:'bsl'/2 is modified on the master branch to never fail if called with a huge second argument.
2018-01-10Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Add a test of erl_tar:table/1,2 Fix false Dialyzer warnings for erl_tar:table/1
2018-01-09dialyzer: Add a test of erl_tar:table/1,2Hans Bolinder
2018-01-09Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Correct handling of erlang:abs/1
2018-01-08dialyzer: Correct handling of erlang:abs/1Hans Bolinder
See also https://bugs.erlang.org/browse/ERL-551.
2017-10-13erts: Implement maps path iteratorLukas Larsson
2017-02-14Fixed typos in lib/dialyzerAndrew Dryga
2017-01-12Merge branch 'maint'Hans Bolinder
* maint: stdlib: Correct signatures of functions in erl_parse
2017-01-10stdlib: Correct signatures of functions in erl_parseHans Bolinder
The signatures of erl_parse:anno_to_term/1 and erl_parse:anno_from_term/1 are corrected. Using these function no longer results in false Dialyzer warnings.
2017-01-10Merge branch 'maint'Hans Bolinder
* maint: stdlib: Allow characters in types and constant patterns
2016-12-21stdlib: Allow characters in types and constant patternsHans Bolinder
Characters ($char) can be used in constant pattern expressions. They can also be used in types and contracts.
2016-11-23Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Substitute 'opacity' for 'opaqueness' dialyzer: Improve a warning message dialyzer: Improve a warning message dialyzer: Correct a warnings message
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-02Merge branch 'maint'Hans Bolinder
* maint: Update preloaded erts: Correct type declaration of match specification head Conflicts: erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam
2016-11-01erts: Correct type declaration of match specification headHans Bolinder
Bug reported by Peti Gömöri <[email protected]>.
2016-09-26Use @ in variable names generated by core and kernelJosé Valim
The previous variable names can be generated by projects like LFE and Elixir, leading to possible conflicts. Our first to choice to solve such conflicts was to use $ but that's not a valid variable name in core. Therefore we picked @ which is currently supported and still reduces the chance of conflicts.
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-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-04-28dialyzer: Improve map pattern typesettingMagnus Lång
2016-04-28dialyzer: Unfold cerl patterns containing mapsMagnus Lång
Dialyzer relies heavily on the assumption that the type of a literal that is used as a pattern is the type of any value that can match that pattern. For maps, that is not true, and it was causing bad analysis results. A new help function dialyzer_utils:refold_pattern/1 identifies maps in literal patterns, and unfolds and labels them, allowing them to be properly analysed.
2016-04-28dialyzer_dataflow: Add map supportMagnus Lång
2016-04-28dialyzer_typesig: Add map supportMagnus Lång