Commit Graph
8996 Commits
Author SHA1 Message Date
José Valim 58fe2a8c11 Fix race condition in tests 2020-10-02 23:10:45 +02:00
Dave Lucia 9531b483d1 Enum.max_by/3 and Enum.min_by/3 dialyzer fixes (#10383) 2020-10-01 13:23:06 +02:00
Michał Łępicki dfee223416 Fix typo in types_test.exs (#10382)
existant -> existent
2020-10-01 10:58:08 +02:00
José Valim 5831068b92 Lift on errors (#10380) 2020-09-30 13:51:32 +02:00
José Valim ed209961f9 Handle value vars in open maps without singleton keys (#10378) 2020-09-29 17:54:31 +02:00
José Valim 6cf70ef0e8 Handle var | left_type < right_type (#10377) 2020-09-29 17:54:11 +02:00
José Valim f999467060 Fix inference of open maps with non-singleton keys
Closes #10371.
2020-09-29 13:11:03 +02:00
Everett Griffiths 759b649681 Clarify args passed to callback fun in File.cp/3 (#10374)
And improve general readability of this function's docs
2020-09-28 17:05:28 +02:00
Paulo Daniel Gonzalez 54ac0f3c9c Use timer function instead of manually calculating milliseconds (#10367) 2020-09-27 16:41:25 +02:00
Hassan Shaikley db00a3e1cd ArgumentError example for binary_part (#10370) 2020-09-27 08:44:07 +02:00
Tomasz Kowal f1866ef80a Fix copy paste mistake in String.capitalize docs (#10369) 2020-09-26 08:44:30 +02:00
José Valim 21ffdb6901 Fallback to regular attribute lookup 2020-09-25 12:58:58 +02:00
Gustavo Saiani a9e5522bb0 Remove duplicate assertion (#10366) 2020-09-24 14:51:41 +02:00
José Valim 38322537f6 Catch dialyzer bug 2020-09-23 16:14:57 +02:00
Gabriel Alves cb2af64aef Raise instead of crashing on when trying to use list operators in guards (#10363) 2020-09-23 14:30:11 +02:00
José Valim 4de2df4518 Add a note on async_stream+take 2020-09-22 11:11:52 +02:00
John-Goff 1bf7e3dbfc Update docs of Task.async_stream to talk more about side effects (#10359) 2020-09-21 16:06:45 +02:00
Gustavo Saiani 4823650147 Remove duplicated assert in quote test (#10358) 2020-09-21 14:49:17 +02:00
José Valim 0d40808f47 Remove fresh context to optimize in-body guards (#10356) 2020-09-21 14:01:47 +02:00
Jason Goldberger c0cd1e36e3 Improved performance of List.last/1 (#10350) 2020-09-20 21:56:37 +02:00
Eksperimental 6d30dc12bc Rename struct attribute in defstruct (#10354)
Rename `@struct` to `@__struct__`.

Closes #10352
2020-09-20 20:26:25 +02:00
Eksperimental 25b67a458d Add guard checks to Keyword.update/4 (#10348) 2020-09-18 20:13:24 +02:00
José Valim 46ebd22d0d Deprecate @foo() in favor of @foo, closes #10344 2020-09-18 16:36:28 +02:00
José Valim d86413ed2d Make replace and replace! in Keyword consistent, closes #10345 2020-09-18 16:13:09 +02:00
José Valim 797aa760b1 Return an empty map instead of none for public but undocumented functions 2020-09-18 11:59:44 +02:00
José Valim a9370756db Handle empty map in other places, closes #10343 2020-09-18 10:53:49 +02:00
José Valim b4fe946ae7 Align doc chunks return with EEP 48 2020-09-18 10:41:34 +02:00
José Valim e2f5cff395 Update iso.ex 2020-09-17 19:21:37 +02:00
Eksperimental 6dbc555bbd Fix and improve specs and docs in Map.pop/3 and Map.pop!/2 (#10341) 2020-09-17 16:35:14 +02:00
Eksperimental 861ee0dc96 Update formatter inputs (#10335) 2020-09-16 07:59:36 +02:00
Eksperimental 615692f9fc Update map.ex (#10338)
Make output reflect how it is actually represented
2020-09-16 07:28:18 +02:00
José Valim 7e4bd5dcf7 Properly handle reduce in types, closes #10224 2020-09-14 23:01:58 +02:00
Eksperimental bb90ae1239 Format missing Collectable implementation (#10334) 2020-09-14 19:44:37 +02:00
José Valim e2cdbf52d8 More typing improvements (#10333)
1. Move push_expr_stack to unify and keep helpers typing free

2. Add get_var! when accessing variables so it helps us find
   variables that have not been properly processed

3. Properly process all variables found missing on step 2
2020-09-14 19:30:35 +02:00
Eksperimental 03001b1c58 Improve docs and argument names for Collectable module (#10332)
It is not clear what original mean, if the element we extract data or the element we put into.
For clarity I chose to name it the same as the module.

this change make it clear that what needs to be returned is the initial accumulator and not the collectable we are
puting data into.

-          {original, collector_fun}
+          initial_acc = map_set
+
+          {initial_acc, collector_fun}

mention that the MapSet implementation is a simplified version, not the real one.

The implementations in the module have been reformated and some attribute names changed, so it is easier for developers who want to read the source code to understand how protocols are implemented.
2020-09-14 18:07:57 +02:00
Eksperimental 40d855a651 Add v1.12 to Comptaibility page (#10330) 2020-09-14 15:23:38 +02:00
José Valim 8885108b5d Remove boolean and number as builtin types (#10329) 2020-09-14 14:04:06 +02:00
José Valim 3819745588 Infer -> Unify 2020-09-14 13:32:13 +02:00
José Valim 8db176e8bf Remove duplicate tests 2020-09-14 11:40:36 +02:00
José Valim 9fb94cd49a Start v1.12+ 2020-09-14 09:45:34 +02:00
Adriano Mitre f431818254 Add "since" doc metadata to File.rename/2 (#10328) 2020-09-14 09:08:58 +02:00
José Valim 1df4634475 Hoist expressions when creating records, closes #10313 2020-09-13 12:27:59 +02:00
José Valim 07dfe5ee0f Document all built-in types internally (#10327)
Also document which functions must be changed once
new types are introduced and which functions must
handle them.

Make sure all of these functions comply to the spec
and improve performance for tuples.
2020-09-13 12:22:38 +02:00
Eric Meadows-Jönsson 78f6bccc11 Move type warnings (#10324)
No longer needs to compile modules to test type warnings. Reduces type tests execution time from 1.0s to 0.6s.
2020-09-13 10:48:51 +02:00
José Valim 081a34a17e Handle subtypes in map keys (#10323) 2020-09-13 09:41:48 +02:00
Saša Jurić 3bff1fa9a9 Fix unregistration crash (#10326) 2020-09-13 09:32:37 +02:00
Adriano Mitre 88b359b3e0 add "since" doc metadata to System.otp_release/0 (#10325) 2020-09-12 22:19:48 +02:00
Eksperimental 3f8b92a7bb Improve wording in Map module (#10318) 2020-09-12 09:08:14 +02:00
sabiwara a9b54819a4 Improve links in pattern matching page (#10322) 2020-09-12 09:05:39 +02:00
Eksperimental abd7eca838 Fix small typo in comment (#10321) 2020-09-11 20:00:53 +02:00