José Valim
0db0b85f52
Consider case ignorable characters on Greek downcasing, closes #7149
...
Note this does not impact the runtime cost of other downcasing
operations. The final beam file grew only in 8kb.
2018-01-09 13:59:13 +01:00
José Valim
56b6d2894a
Warn if heredoc is outdented, closes #7174
2018-01-07 17:46:42 +01:00
Frank Hunleth
d96919352d
Fix inspect for non-decimal negative integers ( #7181 )
...
Before:
iex> inspect(-1, base: :hex)
"0x-1"
After:
iex> inspect(-1, base: :hex)
"-0x1"
This change also applies to the octal and binary base options.
2018-01-05 18:44:17 +01:00
José Valim
0c4ba5b653
Properly handle :erlang.element in Exception blame
2018-01-05 17:22:20 +01:00
José Valim
f85e490cb3
Rearrange equals and inserts for shorter diff scripts
...
Closes #7169 .
2018-01-02 23:06:52 +01:00
José Valim
08eb97021d
Do not leak variables during optimizations, closes #7161
2018-01-01 12:04:15 +01:00
José Valim
3db9d7e224
Organize struct name matching in map_test
2017-12-30 18:42:45 +01:00
Donald Little
2337d11ecb
Return right side expression value on struct matching ( #7160 )
2017-12-30 18:35:40 +01:00
José Valim
56413f3a42
Remove deprecation warnings
2017-12-26 23:18:18 +01:00
José Valim
3f95b4a17d
Improvements to greek handling of downcase, closes #7149
2017-12-26 23:11:17 +01:00
José Valim
a12d8ec342
Store expanded expressions in defguard, closes #7147
2017-12-26 00:06:28 +01:00
José Valim
1e3522b202
Revert "Add support for supervisor fun to Task.Supervisor.async_stream/* ( #6552 )"
...
This reverts commit 753a26dcc0 .
2017-12-23 20:01:32 +01:00
José Valim
242240fa1a
Format protocol dialyzer test
2017-12-22 13:38:03 +01:00
José Valim
d83ccdb419
Ensure no dialyzer warnings after protocol consolidation, closes #7107
2017-12-22 12:36:24 +01:00
José Valim
bff1664d05
Do not move comments from first argument of no parens calls, closes #7130
2017-12-22 11:27:32 +01:00
José Valim
f589d40876
Format string.ex and improve upcase coverage
2017-12-20 12:13:25 +01:00
José Valim
2a6a545b8b
Provide :greek and :ascii mappings in String upcase/downcase/capitalize
...
Closes #7105 .
2017-12-20 11:54:06 +01:00
José Valim
3e7d62ff89
Make split operations consistent with replace
...
Both String.replace/3 and Regex.replace/3 consider there is
an empty string before and after the subject when doing replacements:
String.replace("abc", "", "x")
#=> "xaxbxcx"
This change makes String.split/2 and Regex.split/2 consistent
with this operation by returning empty strings before and after
the split subject:
String.split("abc", "")
#=> ["", "a", "b", "c", ""]
Closes #7023
2017-12-20 10:55:32 +01:00
José Valim
83f080e27c
Do not invoke after_fun in chunk_while if emitted element halts, closes #7112
2017-12-19 13:53:03 +01:00
José Valim
36bc3df3d4
Reduce the number of ets lookups for reading impl
2017-12-19 12:03:55 +01:00
Glauber Campinho
59ba0ad57a
Introduce @deprecated ( #7113 )
2017-12-19 11:44:35 +01:00
Glauber Campinho
80b1c93238
Improve protocol consolidation tests for docs ( #7119 )
...
`Code.get_docs/1` calls `:code.get_object_code/1` with the module and
this returns the old binary instead the consolidated one.
2017-12-17 09:33:00 +01:00
José Valim
e9e2d3f234
Also consider when acc_count is more than count
2017-12-15 10:25:29 +01:00
Alberto Almagro Sotelo
fe2e6eaf12
Fix Stream.chunk_every/4 odd results when step > count ( #7114 )
...
Stream.chunk_every/4 was giving odd results when step was greater than
count and the last element of the enumerable was the same as last
chunk's last element.
This commit fixes this issue and adds tests for different scenarios when
step > count. It also adds a doctest example to reflect this in the
documentation and test it simultaneously.
Fixes #7096
2017-12-15 10:21:38 +01:00
Glauber Campinho
1ed51a6f65
Remove multiple clauses warning for default values on bodiless clause ( #7092 )
2017-12-11 21:38:49 +01:00
José Valim
e43f5f53b2
Do not indent right-side of pipelines in the formatter ( #7103 )
2017-12-11 21:07:30 +01:00
José Valim
be407a4eb8
Introduce @since as non-warning definition annotation
...
Partially implements #7099 .
2017-12-11 18:22:08 +01:00
José Valim
ee322b42e7
Fix count_children for Task.Supervisor, closes #7101
2017-12-11 16:13:29 +01:00
José Valim
192aee5164
Use a single table instead of digraph for tracking locals
...
This reduces the number of spawned ETS tables from 3 to 1
per local tracker and also removes the need for a separate
process.
Closes #7091 .
2017-12-06 19:49:54 +01:00
José Valim
bc0376c7aa
Inspect tuples closer to the formatter, closes #6509
2017-12-06 12:01:48 +01:00
Donald Little
3c7b65eae4
Show UTF-8 BOM on inspected strings ( #7085 )
2017-12-03 14:04:52 +01:00
Glauber Campinho
43af496405
Move boolean checks optimizations to Kernel ( #7071 )
2017-11-30 00:29:54 -02:00
Glauber Campinho
550cf2ccac
Translate clauses for boolean check ( #7069 )
...
Warnings for unsafe variable on boolean checks stopped working after #7015 because
variables of the right clause are unbound on the left clause.
Fixes #7044
2017-11-28 11:56:13 -02:00
James Fish
2044a02c76
Do not raise on non-integer values in is_odd/is_even ( #7063 )
2017-11-26 12:54:37 -02:00
Ivan Kozik
0de3801e39
Clarify File.exists? behavior for dangling symlinks ( #7056 )
2017-11-22 01:51:06 -02:00
Aleksei Magusev
2fdb7b51c6
Consider microseconds in maximum possible Calendar.ISO datetime ( #7055 )
2017-11-21 23:18:43 +01:00
José Valim
f9414705ab
Properly take "do" into account on line breaks, closes #7052
2017-11-21 14:54:42 -02:00
Eric Meadows-Jönsson
d71329550b
assert_receive should expand in match context ( #7042 )
...
Closes #7041 .
2017-11-19 07:24:25 -02:00
jgmchan
6ae232efd5
Show better error if an anonymous function has default arguments
2017-11-16 13:53:28 -02:00
Glauber Campinho
ed9c9b1601
Remove dialyzer warnings from else in with clauses ( #7031 )
...
Add generated: true to guard clauses from else in with clauses
Resolves #6426
2017-11-15 20:53:57 +01:00
Glauber Campinho
fe47af5075
Warn duplicate definitions in macros ( #7037 )
...
Closes #6637
2017-11-15 20:52:28 +01:00
Eric Meadows-Jönsson
87bf050e2c
Fix precedence of bitwise XOR (^^^) in formatter ( #7036 )
...
Closes #7034 .
2017-11-15 19:53:20 +01:00
Glauber Campinho
8bfe9b9cca
Fix @impl warnings with default arguments ( #7028 )
2017-11-15 12:04:23 +01:00
Glauber Campinho
673fddf40c
Support uniq: true in for comprehensions ( #7020 )
2017-11-13 23:00:53 +01:00
José Valim
7741cede92
Migrate Task.Supervisor to DynamicSupervisor
...
This means Task.Supervisor now supports max_children
and the restart and shutdown value should now be given
per task and not per supervisor.
2017-11-10 15:02:12 +01:00
José Valim
efe996ace8
Add DynamicSupervisor ( #7006 )
2017-11-09 22:14:26 +01:00
José Valim
77cdfc009f
Ensure we track behaviours at compile time
2017-11-09 22:13:58 +01:00
Raphaël Lustin
c8131a9d02
Add truncate to Time, DateTime and NaiveDateTime ( #7010 )
...
Fixes #6997
2017-11-08 13:45:44 +01:00
José Valim
d80e187775
Only consider a document doesn't fit if it has breaks
...
Closes #7007
2017-11-07 16:03:48 +01:00
José Valim
ef59364202
Add end_line information to string_to_quoted tests
2017-11-07 11:02:21 +01:00