Gabriel Alves
b2f561ef90
Raise instead of crashing on when trying to use list operators in guards ( #10363 )
2020-09-23 14:30:11 +02:00
Eksperimental
7dc2dd2e8e
Rename struct attribute in defstruct ( #10354 )
...
Rename `@struct` to `@__struct__`.
Closes #10352
2020-09-20 20:26:25 +02:00
José Valim
b1d9f3da66
Return an empty map instead of none for public but undocumented functions
2020-09-18 11:59:44 +02:00
José Valim
3d43d93d45
Infer -> Unify
2020-09-14 13:32:13 +02:00
José Valim
8167bb65d1
Move struct handling from unify to AST ( #10320 )
...
We also improve error messages to list all
available fields and introduce Module.Types.Of
module to hold shared functionality between Expr
and Pattern.
2020-09-11 19:51:46 +02:00
José Valim
b52ddb30e0
Move Checker into ParallelChecker
2020-09-10 20:04:10 +02:00
José Valim
9b388a58a1
Reuse logic on exception blame and types errors
2020-09-10 15:46:09 +02:00
Eric Meadows-Jönsson
ef0f17dfe5
Improve map unification ( #10310 )
2020-09-10 12:37:43 +02:00
sabiwara
1fca074184
Fix &//2 parsing issue ( #10312 )
2020-09-10 09:20:07 +02:00
José Valim
749459a32f
Merge remote with inference pass ( #10305 )
2020-09-08 09:08:44 +02:00
José Valim
e3344123c2
Do not propagate tracers to dynamic definitions, closes #10271
2020-08-18 20:06:44 +02:00
Eksperimental
df449805c8
Revise use of Note and Notice verbs ( #10264 )
2020-08-14 07:59:34 +02:00
José Valim
e1e8f9afec
Add column information to SyntaxError and TokenMissingError
2020-08-12 20:14:31 +02:00
José Valim
afa6d0c177
Add test for invalid tokenizer expressions
2020-08-12 14:18:13 +02:00
Eksperimental
512594c08a
Mention file:line in Already defined as ... error message ( #10219 )
2020-07-22 14:59:37 +02:00
José Valim
92cf894756
Require a trailing underscore to consider it a compiler variable
2020-07-17 13:59:52 +02:00
Fernando Tapia Rico
fc6bf59462
Add List.Chars to bootstrap modules
...
If there is a compile error, Kernel.ParallelCompiler raises
`** (UndefinedFunctionError) function List.Chars.to_charlist/1 is
undefined (module List.Chars is not available)`.
2020-07-16 13:20:38 +02:00
José Valim
6228ade7d2
Do not warn if quotes are used on complex atoms
...
Atoms that have non-ascii characters or @ does not
require tokens. That's to streamline the developer
experience around examples :"foo@computer-name" and
:"hélló".
2020-07-15 20:10:31 +02:00
José Valim
08706cc490
Warn if a variable that looks like a compiler variable is unused ( #10198 )
...
Closes #10197 .
2020-07-15 12:20:49 +02:00
José Valim
7aa93b188c
Improve compiler error message when using | in a def pattern
2020-07-11 10:22:28 +02:00
José Valim
089d0cd6b6
Use macros instead of special casing in the compiler
2020-07-01 15:49:14 +02:00
José Valim
0166ee82a1
Do not read from ExCk chunk if not necessary
...
Since all information is in the debug chunk, we use
that instead. This also allows us to remove
`no_warn_undefined` from the ExCk chunk.
2020-06-25 15:34:46 +02:00
José Valim
e51cc8b88c
Also track exports API via local deps
2020-06-25 15:09:14 +02:00
José Valim
8b4ec95a99
Revert "Consistently handle empty blocks"
...
Actually, we don't allow `-> [EMPTY]` anywhere else.
This reverts commit 3c6891cb7d .
2020-06-25 12:32:07 +02:00
José Valim
3c6891cb7d
Consistently handle empty blocks
2020-06-24 20:48:05 +02:00
José Valim
9a6db666a1
Do not make requires/imports compile-time dependencies
...
Previously, imports and requires were always added as
compile-time dependencies. With this change, they are
"export" dependencies, which are dependencies that depend
on the API defined by a module, such as struct and its
public definitions.
This change should drastically remove the amount of
modules recompiled in Elixir, making imports more feasible
for large projects.
2020-06-24 14:30:00 +02:00
Ioannis Pinakoulakis
6666b7bb31
Typos on the erlang files ( #10118 )
2020-06-21 11:14:11 +02:00
Kelvin Stinghen
83374a88c9
Rewording the default arguments warnings ( #10097 )
2020-06-13 11:28:09 +02:00
José Valim
cc138f37f2
Add line numbers to deprecated imports
2020-06-11 15:59:07 +02:00
José Valim
0df37749af
Use reserved word where appropriate instead of token/keyword
2020-06-11 10:34:50 +02:00
José Valim
0bbcb8f280
Add is_map_key as a function that returns booleans
2020-06-07 17:27:12 +02:00
José Valim
4fea9cc942
Recompile Kernel before bootstrapping stdlib ( #10002 )
...
Before this patch, we could have slightly different
AST while compiling modules in parallel, depending
if modules were recompiled or not. Now we always
recompile Kernel before compiling the whole stdlib.
We used this opportunity to simplify bootstrap by
breaking it two steps. The first step is the minimal
necessary to compile Kernel itself. The second step
contains the whole compiler.
Closes #10000 .
2020-04-30 01:38:04 +02:00
José Valim
8bcbfe9a87
Do not send keyword through static_atoms_encoder, closes #9996
2020-04-29 11:09:05 +02:00
José Valim
8770a61769
Handle ; inside empty parens, closes #9964
2020-04-26 11:42:20 +02:00
José Valim
3fe3accc05
Force modules to be loaded when they are required
2020-04-26 11:03:30 +02:00
Michał Łępicki
4da2b27863
Fix multiple dialyzer errors in the Elixir application ( #9965 )
...
* fix dialyzer issue in ParallelChecker.verify/2
* fix dialyzer specs for elixir_errors:form_error and elixir_errors:form_warn
* fix dialyzer error caused by erl_anno:anno type being opaque in exception.ex
* fix spec for File.stream!
* fix spec for IO.getn/2 - dialyzer doesn't support overloaded specs
* add explicit spec for System.halt/0 to fix dialyzer error
* fix spec for Regex.recompile/1
2020-04-26 09:40:40 +02:00
José Valim
ec13373031
Allocate line zero ann just once
2020-04-25 20:41:53 +02:00
Michał Łępicki
7094e9754c
Fix dialyzer errors caused by erl_anno:anno type being opaque ( #9961 )
2020-04-25 20:29:56 +02:00
José Valim
8ec9860a4e
Ensure generated docs can be overridden without explicit clause
2020-04-25 00:35:04 +02:00
Ivan Rublev
29f29419a2
Add +++ and --- with right associativity to the list of custom operators ( #9954 )
2020-04-21 13:03:31 +02:00
José Valim
4e8ff12bea
Add |/2 to special forms
2020-04-13 21:22:03 +02:00
Pablo Costas
110dfe67aa
Fix tokenizer emitting repeated warnings in the REPL ( #9924 )
...
Now we only emit tokenizer warnings upon tokenization success.
2020-04-10 00:48:49 +02:00
José Valim
3300016a85
Fix Erlang compiler bug on 21.0
2020-04-10 00:46:37 +02:00
José Valim
8742096f77
Do not emit warwnings for injected funs
2020-04-07 18:23:04 +02:00
José Valim
3d3e233255
Refactor binary handling
2020-04-05 20:15:50 +02:00
José Valim
68ad287a58
Improve error message for nested binaries in match without specifiers, closes #9908
2020-04-04 12:35:46 +02:00
Wojtek Mach
2701169b1e
Use new ExDoc extras auto-links ( #9912 )
2020-03-27 00:05:48 +01:00
José Valim
f3806f82af
Revert "Use an empty keyword list instead of nil for empty definitions"
...
Closes #9910
This reverts commit 4477115675 .
2020-03-24 20:21:01 +01:00
José Valim
68c1ae2545
Fix formatting
2020-03-21 19:36:05 +01:00
José Valim
644bc7c5d7
Skip sys_core_prepare pass on Erlang/OTP 23+
2020-03-18 14:21:13 +01:00