José Valim
de093b4eda
Prune tracers when fetching __ENV__ inside functions, closes #10466
2020-10-30 13:30:01 +01:00
Łukasz Samson
ef12f75c9a
Add more information when behaviour_info/1 is called locally ( #10446 )
2020-10-20 16:36:07 +02:00
José Valim
738edbad92
Warn when using special functions locally, closes #10444
2020-10-20 10:51:43 +02:00
José Valim
3916baf541
Do not crash if a module is given instead of file on inner compiler error
2020-10-20 10:51:43 +02:00
José Valim
eaa48e4f5b
Allow @on_load to be private, closes #10438
2020-10-17 20:08:06 +02:00
José Valim
7c0e28b682
Raise for is_record guards, closes #10436
2020-10-17 19:33:03 +02:00
José Valim
817d33c052
Ignore tracers if lexical tracker is dead or explicitly nil
2020-10-11 00:15:25 +02:00
Milton Mazzarri
92c8dcc8c2
Do not show warning when super is in GenServer.child_spec/1 ( #10418 )
...
The original goal[1] was to deprecate the usage of `super` on every `GenServer`
callback, but `child_spec/1` is not a callback, it's a default implementation
that can be re-implemented.
This commit removes the _deprecation warning_ when someone use `super` in
`GenServer.child_spec/1`.
Fixes : #10415
[1] https://github.com/elixir-lang/elixir/commit/12a4ea4c9fb83dd9f370fc9247207c02cf0d5443#diff-ed0344c13ed25389035f337d94902894R301-R316
2020-10-10 23:31:05 +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
Eksperimental
6d30dc12bc
Rename struct attribute in defstruct ( #10354 )
...
Rename `@struct` to `@__struct__`.
Closes #10352
2020-09-20 20:26:25 +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
3819745588
Infer -> Unify
2020-09-14 13:32:13 +02:00
José Valim
2a5caaf18c
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
e7acc2540e
Move Checker into ParallelChecker
2020-09-10 20:04:10 +02:00
José Valim
2cb4976fbc
Reuse logic on exception blame and types errors
2020-09-10 15:46:09 +02:00
Eric Meadows-Jönsson
436a279d89
Improve map unification ( #10310 )
2020-09-10 12:37:43 +02:00
sabiwara
cc8c657fbe
Fix &//2 parsing issue ( #10312 )
2020-09-10 09:20:07 +02:00
José Valim
9848ce8f19
Merge remote with inference pass ( #10305 )
2020-09-08 09:08:44 +02:00
José Valim
4389a63c57
Do not propagate tracers to dynamic definitions, closes #10271
2020-08-18 20:06:44 +02:00
Eksperimental
6944a67965
Revise use of Note and Notice verbs ( #10264 )
2020-08-14 07:59:34 +02:00
José Valim
2bc8541cae
Add column information to SyntaxError and TokenMissingError
2020-08-12 20:14:31 +02:00
José Valim
5e96a9e1b1
Add test for invalid tokenizer expressions
2020-08-12 14:18:13 +02:00
Eksperimental
b39b7b5e64
Mention file:line in Already defined as ... error message ( #10219 )
2020-07-22 14:59:37 +02:00
José Valim
4bbd5ad3a3
Require a trailing underscore to consider it a compiler variable
2020-07-17 13:59:52 +02:00
Fernando Tapia Rico
767a14d6a5
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
f15a83f76c
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
84246a9344
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
2b9181beb3
Improve compiler error message when using | in a def pattern
2020-07-11 10:22:28 +02:00
José Valim
e86a91aae3
Use macros instead of special casing in the compiler
2020-07-01 15:49:14 +02:00
José Valim
c35fb377ca
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
c58af67b84
Also track exports API via local deps
2020-06-25 15:09:14 +02:00
José Valim
cd2ed7c7cf
Revert "Consistently handle empty blocks"
...
Actually, we don't allow `-> [EMPTY]` anywhere else.
This reverts commit 00a6401f3f .
2020-06-25 12:32:07 +02:00
José Valim
00a6401f3f
Consistently handle empty blocks
2020-06-24 20:48:05 +02:00
José Valim
b577287cac
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
367fc1cb34
Typos on the erlang files ( #10118 )
2020-06-21 11:14:11 +02:00
Kelvin Stinghen
3977dd37e5
Rewording the default arguments warnings ( #10097 )
2020-06-13 11:28:09 +02:00
José Valim
bb808fe683
Add line numbers to deprecated imports
2020-06-11 15:59:07 +02:00
José Valim
80c37a8dc9
Use reserved word where appropriate instead of token/keyword
2020-06-11 10:34:50 +02:00
José Valim
fbc5c5a372
Add is_map_key as a function that returns booleans
2020-06-07 17:27:12 +02:00
José Valim
d35c3104e7
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
ff2b0ab5f3
Do not send keyword through static_atoms_encoder, closes #9996
2020-04-29 11:09:05 +02:00
José Valim
fbaba1cce1
Handle ; inside empty parens, closes #9964
2020-04-26 11:42:20 +02:00
José Valim
9ce3f7d816
Force modules to be loaded when they are required
2020-04-26 11:03:30 +02:00
Michał Łępicki
32b767a10f
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
ab295f38dd
Allocate line zero ann just once
2020-04-25 20:41:53 +02:00
Michał Łępicki
5cf65513bd
Fix dialyzer errors caused by erl_anno:anno type being opaque ( #9961 )
2020-04-25 20:29:56 +02:00
José Valim
412994c3f7
Ensure generated docs can be overridden without explicit clause
2020-04-25 00:35:04 +02:00
Ivan Rublev
0ae5f4fda5
Add +++ and --- with right associativity to the list of custom operators ( #9954 )
2020-04-21 13:03:31 +02:00
José Valim
5ce542dcdc
Add |/2 to special forms
2020-04-13 21:22:03 +02:00
Pablo Costas
3cee477f51
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