Wojtek Mach
480c3a30be
Fix unused variable warnings ( #9790 )
2020-02-06 20:27:47 +01:00
José Valim
3ea9abaca0
Add missing :erlang.size/1 guard, closes #9789
2020-02-06 18:44:49 +01:00
Jesse Van Volkinburg
35665e7aac
Warn on use of non-match argument to with/1 ( #9784 )
...
Closes #9764 .
2020-02-05 13:14:55 +02:00
José Valim
53dbf7083e
Add Code.can_await_module_compilation?/0 ( #9777 )
2020-02-05 11:39:08 +01:00
José Valim
b9e2d38bb6
Only warn for commas at the end of words
2020-02-04 13:25:02 +01:00
José Valim
c31958aa17
Add tests for timer and interval with infinity
2020-02-03 12:42:05 +01:00
Fernando Tapia Rico
02abfb75fc
Remove unneeded code in test ( #9778 )
2020-02-03 11:23:51 +01:00
José Valim
1ce5b6a311
Run formatter
2020-02-03 09:46:48 +01:00
José Valim
8715a7215e
Remove redundant process test
...
The previous test already checked trapping exits
returns the exit message.
2020-02-03 09:09:00 +01:00
José Valim
89bc4aff6c
Raise proper error message for invalid strftime format
2020-02-02 10:03:00 +01:00
Piotr Szmielew
66f13b7051
Deprecate remote nil arity calls without parens ( #9769 )
2020-02-01 20:54:45 +01:00
José Valim
534d8eac6b
Do not emit invalid code when formatting assocs in maps, closes #9771
2020-02-01 11:18:28 +01:00
Piotr Szmielew
4460b53e1f
Allow using remote or rpc with compile_env
...
Signed-off-by: José Valim <jose.valim@dashbit.co >
2020-01-30 12:05:17 +01:00
José Valim
93a3c5f958
Do not allow bad lines at runtime
2020-01-27 15:37:32 +01:00
José Valim
caf642f311
Updates to Calendar.stfrtime/3
2020-01-24 10:34:06 +01:00
Gustavo
0f2c0b3fd2
Turn NimbleStrftime into a Calendar function ( #9747 )
2020-01-24 09:04:05 +01:00
José Valim
5918b24d72
Allow file, line and context to be dynamically set on quote, closes #9721
2020-01-23 20:26:16 +01:00
Eric Meadows-Jönsson
1d7af251ad
Only error for duplicate map keys in matches ( #9748 )
...
In matches we will error:
%{a: :b, a: :c} = %{a: :b}
In normal expressions we will only warn:
%{a: :b, a: :c}
2020-01-21 18:15:35 +01:00
José Valim
b2de6d8cd8
Clear up all monitors on async_many failures
2020-01-19 13:21:23 +01:00
Ian Young
86df142ed0
Add Task.await_many/2 ( #9741 )
2020-01-19 13:14:03 +01:00
Wojtek Mach
7287ae758a
Fix bug: move :indentation from sigil meta to binary meta ( #9738 )
...
We need it there so we can retrieve it like this:
defmacro sigil_E({:<<>>, meta, [expr]}, []) do
options = [
line: __CALLER__.line + 1,
indentation: meta[:indentation] || 0
]
EEx.compile_string(expr, options)
end
2020-01-15 16:11:38 +01:00
Wojtek Mach
331df3587b
Add :indentation to sigil heredoc meta ( #9725 )
2020-01-14 20:45:24 +01:00
Eric Meadows-Jönsson
d8d8eafc52
Keep line number in cond_clause error ( #9730 )
2020-01-14 17:53:25 +01:00
Łukasz Jan Niemier
a189bb24f1
Add is_struct/2 macro ( #9718 )
2020-01-13 09:37:53 +01:00
José Valim
216bf94577
Do not expand interpolation twice, closes #9709
2020-01-12 17:19:50 +01:00
José Valim
b75f5899e1
Remove guard checks on is_odd/is_even as those are tested in defguard, closes #9700
2020-01-12 15:59:59 +01:00
Wojtek Mach
8364149953
Add :column to Code.string_to_quoted*/2
2020-01-12 15:41:36 +01:00
Eric Meadows-Jönsson
b78d68db32
Fix formatting
2020-01-12 13:24:58 +01:00
Eric Meadows-Jönsson
e8c49a446a
Do not warn for functions generated by Erlang compiler ( #9713 )
2020-01-12 12:15:21 +01:00
Eric Meadows-Jönsson
c7f0295d6d
Support map.field syntax in guards ( #9711 )
2020-01-11 16:31:56 +01:00
José Valim
6fd3f52f05
Use meta on rewrites, closes #9714
2020-01-11 12:17:08 +01:00
Eric Meadows-Jönsson
9a627b2f5e
Fix no_parens test
2020-01-11 02:24:04 +01:00
José Valim
9a1d52cb4f
Add more no_parens check to quoted
2020-01-10 09:24:09 +01:00
José Valim
7a159a049c
Keep no_parens distinction in quote/unquote
2020-01-10 09:03:07 +01:00
Eric Meadows-Jönsson
b6f4f4f2f3
Allow any type on the RHS of or/2 ( #9706 )
...
Closes #9704 .
2020-01-09 17:07:18 +01:00
Eric Meadows-Jönsson
c4db8841ab
Improve type check error message ( #9705 )
...
A type error may not always cause a clause to fail.
Related to #9700 .
2020-01-09 15:17:19 +01:00
Dmitry Kakurin
033c7387e2
Fix Path.absname/1 to correctly handle UNC paths on Windows ( #9689 )
2020-01-06 22:50:47 +01:00
Eric Meadows-Jönsson
a72a388e1c
Remove type inversion ( #9695 )
2020-01-06 20:05:17 +01:00
Wojtek Mach
a256c5578e
Add option :all to :no_warn_undefined ( #9691 )
2020-01-06 00:01:52 +01:00
Devon Estes
ec65f8d48a
Always capture delimiter metadata for sigils ( #9671 )
...
This makes it so we're always capturing delimiter metadata for sigils
instead of requiring the `token_metadata` option. This means that we can
now show the correct sigils in ExUnit diffs (and elsewhere) for code
examples.
2020-01-05 16:07:58 +01:00
Sascha Wolf
f0fbf0241a
IO.ANSI.Docs - Properly render quote blocks ( #9684 )
2020-01-05 15:54:24 +01:00
José Valim
6760cdbf14
Run the formatter
2020-01-04 12:52:45 +01:00
José Valim
5dd271d361
Fix bounded funs in macrocallbacks, closes #9687
2020-01-03 17:18:27 +01:00
José Valim
7f86ea3334
Allow reboot to be disabled in releases, closes #9552
2019-12-30 14:06:05 +01:00
José Valim
203d540c3a
Fixes for new Macro.to_string behaviour
2019-12-24 11:57:02 +01:00
José Valim
d2c9824ef9
Respect :no_parens meta in nullary remote calls in Macro.to_string
...
Closes #9668 .
2019-12-24 11:41:02 +01:00
José Valim
00abb3b6e3
Allow positive range slices on infinite streams
...
Closes #9653 .
Closes #9654 .
2019-12-24 11:17:23 +01:00
José Valim
9e560c7909
Make sure error messages contain all relevant information
...
We have recently changed the compiler to emit a warning
for each undefined function with a generic error at the
end saying the module could not be defined.
Unfortunately, some tools like IDEs and Phoenix Reloader
give higher priority to errors over warnings, which means
an error would be shown but without any actionable
information.
This commit changes it so the first undefined function is
an error and all following ones are warnings.
2019-12-23 11:47:21 +01:00
Wojtek Mach
bdc2e99c29
Improve error message on import/2 ( #9663 )
...
Before:
iex(1)> a = [flatten: 1]; import List, only: a
** (CaseClauseError) no case clause matching: {:only, {:a, [version: 0, line: 1], nil}}
(elixir 1.10.0-dev) src/elixir_import.erl:10: :elixir_import.import/4
After:
iex(1)> a = [flatten: 1]; import List, only: a
** (CompileError) iex:1: invalid :only option for import, expected value to be an atom :functions, :macros, or a list literal, got: a
(elixir 1.10.0-dev) src/elixir_import.erl:22: :elixir_import.import/4
2019-12-20 08:56:56 +01:00
José Valim
46f6ba563b
Allow nested cycles, closes #9652
2019-12-16 10:32:19 +01:00