José Valim
e8ea6a5259
Print type violation slogan
2024-06-18 12:46:53 +02:00
Jean Klingler
1c17f1eed3
Fix bug when using pinned variable in with else block ( #13667 )
2024-06-15 18:49:17 +09:00
José Valim
8c5c421b58
Avoid compiling some values twice when building .beam
2024-06-14 09:06:56 +02:00
Jean Klingler
d25845c9d5
Fix dialyzer error when with else clause is calling a no_return function ( #13659 )
...
Close #13656
2024-06-13 21:33:36 +09:00
Lukasz Samson
f3c3d3dde6
Fix crash when capturing ambiguous import
2024-06-10 16:37:10 +02:00
José Valim
7a4060cbf3
Add detail and span to typing diagnostics
...
Closes #13646 .
2024-06-10 16:13:39 +02:00
José Valim
c69938bae7
Use :dot_iex as the option name consistently
2024-06-09 23:28:31 +02:00
José Valim
21840ed563
Do not assume all parser errors can be parsed into erlang terms
2024-06-05 12:21:23 +02:00
José Valim
09c602d10e
Properly parse quoted identifiers in function calls
2024-06-05 12:03:56 +02:00
José Valim
b50d986631
Use __info__ callback directly ( #13630 )
2024-06-02 16:17:02 +02:00
Łukasz Samson
29bb5116d1
Allow to override the info callback in Macro.Env.define_import ( #13628 )
2024-06-02 14:02:33 +02:00
José Valim
478256b59e
Avoid discarding information on conversion to #elixir_ex
2024-06-01 17:58:01 +02:00
José Valim
60f6515c24
Avoid nesting of capture inside macros
...
Unfortunately this makes it so the unused capture
warnings emit false positives, so this particular
warning was removed.
Closes #13609 .
2024-06-01 17:08:18 +02:00
José Valim
a52133fdf0
Remove more checks that can now be performed by the type system
2024-05-30 20:37:37 +02:00
Jean Klingler
c2c4cade84
Replace statement -> expression when relevant ( #13621 )
2024-05-30 15:46:40 +09:00
Łukasz Samson
642cc79bb7
Keep position meta on & capture special variables in expanded AST ( #13607 )
2024-05-27 21:31:04 +02:00
José Valim
1b6c31a0eb
Avoid the number of duplicate traces on imports
2024-05-25 11:10:22 +02:00
José Valim
1508494761
Remove assert_no_clauses check as we already handle ->
2024-05-25 10:55:42 +02:00
José Valim
e29af5ac43
Avoid double tracing on captures
2024-05-25 10:47:57 +02:00
kristofka
4e478b3752
Correctly Macro.escape :quote triplet without meta ( #13594 )
...
Closes #13593 .
2024-05-24 11:33:03 +02:00
José Valim
ba579f1410
Use simpler solution for adjusting map line
2024-05-23 19:44:22 +02:00
José Valim
f0e97d0bef
Solve bootstrap issues on dynamic options to quote
2024-05-23 18:02:01 +02:00
José Valim
03d412f20e
Handle bind_quoted with context correctly, closes #13590
2024-05-23 17:36:36 +02:00
José Valim
f23434e31a
Make term_to_binary on BEAM chunks deterministic
2024-05-22 13:33:51 +02:00
José Valim
37d36f8bd6
Do not expand bind_quoted expressions twice
2024-05-20 18:01:02 +02:00
José Valim
92e0e34a1e
Respect line property when file is given, closes #13542
2024-05-20 17:10:11 +02:00
José Valim
21921dc951
Simplify escaping logic by reducing the number of vars
2024-05-20 14:31:25 +02:00
José Valim
a4429ac239
Do not crash on imports inside nested quotes, closes #13575
2024-05-20 13:13:07 +02:00
José Valim
f9263fdc54
Do not crash on invalid imports metadata
2024-05-20 12:44:37 +02:00
José Valim
5f2f626a05
Do not raise on Macro.Env.expand_import, closes #13573
2024-05-20 10:55:18 +02:00
Łukasz Samson
64d6d3d345
Fix typo in meta key name in elixir_quote ( #13570 )
...
It seems the bug has been introduced in df64d5c6a1 (and 169595f534 ) where `import` meta has been renamed to `imports` but some places were missed
This bug was present since 1.14.0
2024-05-18 10:38:31 +02:00
Jean Klingler
d11b41f65a
Revert alias shadowing warning due to false positives ( #13568 )
...
* Revert "Fix false positive with nested shadowed alias (#13564 )"
This reverts commit 8dc94db457 .
* Revert "Warn on unused shadowed aliases (#13550 )"
This reverts commit d1b3063050 .
2024-05-18 17:00:13 +09:00
Bryan Paxton
496cb2c892
Add support for sigils containing integers ( #13448 )
2024-05-17 12:40:02 +02:00
Jean Klingler
8dc94db457
Fix false positive with nested shadowed alias ( #13564 )
2024-05-17 08:13:19 +09:00
José Valim
d7ea2fa2e4
Handle cursor completion inside fn/rescue/catch/else/after
2024-05-14 17:04:57 +02:00
José Valim
203baf36af
Raise on left-over __cursor__
2024-05-10 15:17:35 +02:00
José Valim
7489ce8572
Perform type checking across comparison operators ( #13527 )
2024-05-02 14:09:41 +02:00
Łukasz Samson
2a7948a472
Fix warn case return value in pid expansion ( #13526 )
2024-05-02 13:36:42 +02:00
José Valim
514355f3d9
Type inference for structs and type checking for dot/remote ( #13518 )
...
We now warn:
* `expr.field` when `expr` may not be a map
* `expr.call()` when `expr` may not be an atom
* `expr.call(...)` when `expr` may not be an atom
* `&expr.foo/1` when `expr` may not be an atom
Furthermore, we lay down the ground work for checking undefined
and deprecation warnings across unions. For example, if you write
this code:
mod = if something?, do: Foo, else: Bar
mod.some_function()
In the future, it will warn if any of Foo OR Bar do not define the relevant function.
Finally, we improve pretty printing of maps and aliases in types.
2024-04-30 14:15:32 +02:00
Jean Klingler
dc6fa24edd
Inline duration building in shift/2 functions ( #13489 )
...
* Inline duration building in shift/2 functions
* Rename __duration__! and define in all modules
2024-04-10 12:57:26 +09:00
José Valim
100d63bfcc
Inline and fix timeout typespec
2024-04-08 21:39:17 +02:00
Jean Klingler
98719ff200
Inline some pure functions calls ( #13483 )
2024-04-08 22:54:03 +09:00
José Valim
c3f48d71f7
Simplify prematch handling
2024-04-03 00:04:48 +02:00
José Valim
12f62e49ca
Re-add simplified purging logic ( #13455 )
2024-03-30 18:30:42 +01:00
José Valim
bcf747f080
Add code comments about async purging
2024-03-30 18:30:22 +01:00
Jean Klingler
1acb267e19
Mark with/1 internal clauses as generates ( #13454 )
2024-03-30 17:13:33 +09:00
José Valim
494a018abb
Ensure invalid only/except does not raise on define_import
2024-03-25 11:27:20 +01:00
José Valim
55704b92a3
Add more error handling to define_alias
2024-03-24 22:29:30 +01:00
José Valim
ac844f4dba
Add Macro.Env.define_import/4
2024-03-24 22:29:30 +01:00
José Valim
206a81bc64
Refactor elixir_import to work with ok/error tuples
...
Also do not raise if an import conflicts with a special form,
instead, discard it.
2024-03-24 22:29:30 +01:00