Age | Commit message (Collapse) | Author |
|
Because the type representation has changed, old PLTs are not
compatible. We update the version to 2.10 because of this.
|
|
|
|
This is analogous to the case of nil. Since #{} is a base-case of almost
all map types, contract and success typing sharing #{} does not mean
much, and is often sign of a violation.
|
|
mk_constraint_list/2 was simplifying (C OR TriviallyTrue) to (C), which
is obviously wrong.
|
|
The assumption that 'try' nodes were only used to wrap entire guards is
no longer true.
We're still swallowing warnings when the handler returns successfully.
Unfortunately, bind_guard/5 would need to be refactored to return a new
state in order to generate those warnings.
|
|
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.
|
|
|
|
|
|
Using the new type syntax, we can specify which keys are required, and
which are optional in a way Dialyzer could use.
|
|
|
|
erl_types typesets mandatory keys with :=, and uses "..." as a shorthand
for "any() => any()". Add these to erl_parse so that all representable
types can be written in type-specs.
|
|
* maps:from_list/1
* maps:get/2
* maps:is_key/2
* maps:merge/2
* maps:put/3
* maps:size/1
* maps:to_list/1
* maps:update/3
|
|
The type of a map is represented as a three-tuple {Pairs, DefaultKey,
DefaultValue}. DefaultKey and DefaultValue are types. Pairs is a list of
three-tuples {Key, mandatory | optional, Value}, where Key and Value are
types. All types Key must be singleton, or "known at compile time," as
the EEP put it. Examples:
#{integer()=>list()} {[], integer(), list()}
#{a=>char(), b=>atom()} {[{a, optional, char()},
{b, optional, atom()}],
none(), none()}
map() {[], any(), any()}
A more formal description of the representation and its invariants can
be found in erl_types.erl
Special thanks to Daniel S. McCain (@dsmccain) that co-authored a very
early version of this with me back in April 2014, although only the
singleton type logic remains from that version.
|
|
* egil/maps-api-additions/PR-1025/OTP-13522:
stdlib: Document maps:update_with/3,4
stdlib: Add tests for maps:update_with/3,4
stdlib: Add maps:update_with/3,4
erts: Add tests for maps:take/2
stdlib: Document maps:take/2
erts: Add BIF maps:take/2
|
|
* bjorn/compiler/cuddle-with-tests:
compilation_SUITE: Use explicit exports
Remove support for running tests on a separate Erlang node
Move code from compilation_SUITE to beam_block_SUITE
Move list comprehension tests to lc_SUITE
Move catch tests to trycatch_SUITE
Remove compilation_SUITE:long_string/1
Move pattern-matching tests to match_SUITE
Remove toothless test compile_SUITE:missing_testheap/1
misc_SUITE: Add missing export of integer_encoding/0
Move test cases from compilation_SUITE to beam_utils_SUITE
Move complex_guard/1 from compilation_SUITE to guard_SUITE
Remove compilation_SUITE:guards/1
Move tests from compilation_SUITE to record_SUITE
Move bit syntax test cases from compilation_SUITE to bs_match_SUITE
Remove useless test case compilation_SUITE:otp_2141/1
compilation_SUITE: Run the Core linter for all compilations
|
|
|
|
|
|
Maps equivalent to dict:update/3,4
|
|
|
|
|
|
With 'export_all' it is easy to add a new test case function
and forget to add its name to the list of test cases to run.
While we are it, remove unused functions and add the forgotten
test case on_load_inline/1.
|
|
It has not been used for ages.
|
|
|
|
|
|
|
|
long_string/1 was written to test that long string were handled
efficiently in beam_asm. Strings used to be stored in the string
table chunk, but are currently literals.
There does not seem that this test case is likely to find any bugs.
|
|
|
|
missing_testheap/1 is no longer relevant for the following reasons:
1) Because of the literal pool introduced in R12, no test_heap
instructions are needed in the guards.
2) beam_validator would abort the compilation if any needed test_heap
instructions were missing.
|
|
The integer_encoding/1 test is supposed to be run with a tighter
timetrap ensure that encoding of integer in BEAM files is efficient
enough.
|
|
beam_utils_SUITE didn't exist when the two test cases were written.
|
|
* xumingthepoet/maint/PR-1008/OTP-13516:
Update global_group_SUITE.erl
Fix global_group.erl
|
|
|
|
* c-rack/fix-erl-dist-protocol-typo/OTP-13517:
Fix typo in description of EPMD_DUMP_REQ response
|
|
According to the source code, there is a space before the newline for unused
nodes and no space before the newline for active ones.
In current documentation, it is exactly opposite.
This commit fixes the documentation to match with source code.
|
|
Conflicts:
OTP_VERSION
lib/ssl/doc/src/ssl.xml
lib/ssl/src/ssl_cipher.erl
lib/ssl/src/tls_v1.erl
lib/ssl/test/ssl_basic_SUITE.erl
|
|
|
|
Obsoleted by guard_SUITE (especially literal_type_tests/1).
|
|
|
|
We used to put code that would crash the compiler into
compilation_SUITE_data. That way we would have a failing test case to
remind us to fix a bug.
Nowadays, we generally fix the bug and write the test case at the same
time. Therefore it makes more sense to put the test code directly into
a test suite.
Move out bin_syntax_1 through bin_syntax_5 test cases. Scrap
bin_syntax_6 because it does not longer seems to be relevant.
While we are it, rename the fun_shadow/1 test to size_shadow/1. Also
make sure that the code produces the correct result.
|
|
|
|
|
|
* raimo/polish-gen_statem/OTP-13065:
Fix hibernation subtlety
|
|
|
|
|
|
Usage: erl -profile_boot ...
|
|
|
|
|
|
* eksperimental/typo_binary_matches/PR-1031:
Remove extra ">" in examples
|
|
|
|
|