Art Kay
8172ff0775
Fix minor typo in the docs ( #14606 )
2025-06-26 07:17:16 +09:00
José Valim
08d3865fad
Transform the struct update syntax into a type assertion
...
This transforms the struct update into a type assertion,
requiring the type system to be sure the expression has
precisely the given struct type.
The struct update syntax may still be deprecated in the
future but this will provide a safer migration path and
allow us to engage in more conversations with the community.
2025-06-25 19:30:04 +02:00
Łukasz Samson
54489ef86f
Fix time unit in comment ( #14600 )
2025-06-24 07:09:23 +02:00
José Valim
54515bf48a
Distinguish source_anno from doc_anno, see #14595
2025-06-21 03:54:44 -07:00
José Valim
9d4c91be2a
Ensure block_keyword_or_binary_operator is handled in surround context, closes #14590
2025-06-21 03:25:36 -07:00
Guillaume Duboc
cc9a5e7682
Simplified tuple definitions by removing negations ( #14596 )
2025-06-20 05:20:08 -07:00
Łukasz Samson
b2587e8633
Handle error result from unescape_tokens in tokenizer ( #14587 )
2025-06-19 12:02:02 -07:00
Łukasz Samson
6ca0ad84b7
Consistently raise UnicodeConversionError in tokenizer ( #14589 )
2025-06-19 12:00:43 -07:00
Christopher Keele
66753a868b
Improve docs for "textual sigils" ( #14591 )
2025-06-19 11:10:55 -07:00
Łukasz Samson
972f9e46ed
Fix invalid warning on no parens call on true ( #14593 )
2025-06-19 05:56:47 -07:00
Łukasz Samson
f07bc7b3d5
Fix typo in elixir_erl_pass inline_pure_function decode_www_form ( #14592 )
2025-06-19 20:08:57 +09:00
José Valim
e27cd15715
Optimize empty_difference_subtype? for dynamic parts
2025-06-14 12:13:15 -07:00
Jean Klingler
d59f49aa54
Mark inlined function call result as generated ( #14581 )
2025-06-14 19:05:31 +09:00
Tobias Pfeiffer
7ad145082b
Document Map.fetch!/2 exception in its doc ( #14573 )
2025-06-12 10:53:06 +02:00
José Valim
fb9a9e97d8
Allow captures to be reconstructed on type system pretty printing
2025-06-11 13:51:24 +02:00
José Valim
e04444c42e
Warn when invalid fun typespec is used
2025-06-11 12:08:45 +02:00
José Valim
5946e8bb9d
Improve error message for bad/missing clauses, closes #14569
2025-06-10 14:38:30 +02:00
Joe Yates
46b5fabc63
Fix use of prefer with '-ing' ( #14568 )
2025-06-10 11:17:04 +02:00
José Valim
bff9f3ebbc
Point out module must be required before macro usage in match/guard
2025-06-10 10:13:50 +02:00
José Valim
ff4adca18a
Filter @compile debug_info when explicitly set to true
...
Closes #14567 .
2025-06-10 09:58:23 +02:00
Theodor-Alexandru Irimia
954133d64c
Clarify why and how to start second session for tests ( #14566 )
2025-06-09 22:26:53 +02:00
José Valim
319360ce9f
Fix logger function link in CHANGELOG
2025-06-09 22:26:31 +02:00
José Valim
52495ba8bc
Add tests for optional subtyping
2025-06-09 13:08:12 +02:00
José Valim
514fbbaf52
Update tables
2025-06-09 12:44:56 +02:00
Michał Łępicki
34cf44587c
Fix mistake in "Untracked compile-time dependencies" anti-pattern ( #14563 )
2025-06-09 12:07:18 +02:00
José Valim
09dcbf7566
Introduce deprecations scheduled for Elixir v1.20
2025-06-07 21:55:06 +02:00
José Valim
c001cbdd62
Start v1.20
2025-06-07 20:21:32 +02:00
José Valim
577c8033ba
Optimize subtype? by aborting early ( #14561 )
...
In the same way we introduced non_disjoint_intersection
to optimize compatibility, we introduce empty_difference
to optimize subtyping.
2025-06-07 15:35:41 +02:00
Jean Klingler
84d806603d
More precise error message when escaping a regex with a ref ( #14560 )
...
* More precise error message when escaping a regex with a ref
* Refactor as do_quote_map_value
* Yet another refactoring proposal
2025-06-07 21:56:10 +09:00
José Valim
b1053b75c5
Use binary appending now that we require Erlang/OTP 26
...
Prompt
======
There is a format/2 function in inspect/algebra.ex that
calls format/3 recursively that returns a list of binaries.
Instead of doing so, I want you to pass a binary as accumulator,
<<>>, and then instead of `[head | format(...)]`, on every
operation you will do `format(<<acc::binary, result::binary>>, ...)`.
Notes
=====
The assistant was able to detect an issue with `collapse/4`
but it was unable to fix it. That and the changes to
mix/tasks/format.ex were addressed manually.
2025-06-07 12:46:47 +02:00
José Valim
b82d2dfa02
Reduce allocation on Inspect.Algebra by using cons cells
2025-06-07 09:57:36 +02:00
José Valim
443d96a396
Introduce non_term_type_to_quoted to avoid additional term_type? checks
2025-06-05 17:45:07 +02:00
José Valim
56e7de39c0
Also pretty print structs with no fields in types
2025-06-05 17:39:49 +02:00
José Valim
063a673901
Check for term_type?(dynamic) before computing difference
2025-06-05 17:33:30 +02:00
José Valim
c6ed523914
Fix bugs and add completeness to function pretty printing
2025-06-05 09:18:32 +02:00
José Valim
7307f3c68d
More tests for function application
2025-06-05 09:18:32 +02:00
José Valim
f295a89cc7
Update CHANGELOG
2025-06-03 11:08:34 +02:00
José Valim
f445cb98c3
Add CHANGELOG for function application and improve pretty printing
2025-06-03 10:53:06 +02:00
José Valim
4b6fdb40e8
Add more tests around compatibility check
2025-06-02 17:05:48 +02:00
José Valim
7819a73311
Simplify compatibility check
2025-06-02 16:53:06 +02:00
José Valim
f6595985a5
Remove compile-time warnings
2025-06-02 16:17:15 +02:00
José Valim
e87cc66041
Allow updated options to be returned from Inspect protocol ( #14554 )
2025-06-02 15:55:36 +02:00
José Valim
21ed59c578
Add more docs and examples around function_exported?/3 and macro_exported?/3
2025-06-01 10:00:58 +02:00
Isaac Yonemoto
2013e93db4
Add warnings on function exported and optional callback ( #14552 )
2025-06-01 09:49:48 +02:00
José Valim
41d1a721ad
Do not skip dynamic for indivisible types inside functions
2025-05-30 11:31:21 +02:00
José Valim
65e084e8f8
Infer types for fn
2025-05-30 11:31:21 +02:00
José Valim
0445e9d606
Add denormalization when pretty printing functions
2025-05-30 11:31:21 +02:00
José Valim
a0d649cce9
Prove hints for empty domains from unions
2025-05-30 11:31:21 +02:00
Frank Hunleth
590a827046
Add ANSI codes to turn off conceal and crossed_out ( #14545 )
2025-05-29 18:57:42 +02:00
Dmitry Kleymenov
340e63b9fe
Add doctests to kernel guards ( #14544 )
2025-05-29 09:46:14 +02:00