Skip to content

Commit 4425d68

Browse files
committed
Update CHANGELOG
1 parent e3f538c commit 4425d68

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

CHANGELOG.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,6 @@
88

99
## Type system improvements
1010

11-
### More type inference
12-
13-
Elixir now performs inference of whole functions. The best way to show the new capabilities are with examples. Take the following code:
14-
15-
```elixir
16-
def add_foo_and_bar(data) do
17-
data.foo + data.bar
18-
end
19-
```
20-
21-
Elixir now infers that the function expects a `map` as first argument, and the map must have the keys `.foo` and `.bar` whose values are either `integer()` or `float()`. The return type will be either `integer()` or `float()`.
22-
23-
Here is another example:
24-
25-
```elixir
26-
def sum_to_string(a, b) do
27-
Integer.to_string(a + b)
28-
end
29-
```
30-
31-
Even though the `+` operator works with both integers and floats, Elixir infers that `a` and `b` must be both integers, as the result of `+` is given to a function that expects an integer. The inferred type information is then used during type checking to find possible typing errors.
32-
3311
### Type checking of protocol dispatch and implementations
3412

3513
This release also adds type checking when dispatching and implementing protocols.

lib/elixir/pages/references/compatibility-and-deprecations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,4 @@ Version | Deprecated feature | Replaced by (ava
235235
[v1.16]: https://github.com/elixir-lang/elixir/blob/v1.16/CHANGELOG.md#4-hard-deprecations
236236
[v1.17]: https://github.com/elixir-lang/elixir/blob/v1.17/CHANGELOG.md#4-hard-deprecations
237237
[v1.18]: https://github.com/elixir-lang/elixir/blob/v1.18/CHANGELOG.md#4-hard-deprecations
238-
[v1.19]: https://github.com/elixir-lang/elixir/blob/main/CHANGELOG.md#4-hard-deprecations
238+
[v1.19]: https://github.com/elixir-lang/elixir/blob/v1.19/CHANGELOG.md#4-hard-deprecations

0 commit comments

Comments
 (0)