Skip to content

Commit 85e00cd

Browse files
committed
Clarify warnings happen on compiled code
1 parent 6c866e8 commit 85e00cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Elixir v1.18 is an impressive release with improvements across the two main effo
44

55
## Type system improvements
66

7-
The most exciting change in Elixir v1.18 is type checking of function calls, alongside gradual inference of patterns and return types. To understand how this will impact your programs, consider the following code:
7+
The most exciting change in Elixir v1.18 is type checking of function calls, alongside gradual inference of patterns and return types. To understand how this will impact your programs, consider the following code in "lib/user.ex":
88

99
```elixir
1010
defmodule User do
@@ -26,7 +26,7 @@ end
2626

2727
Elixir's type system will infer that the `drive/2` function expects a `%User{}` struct and returns either `{:ok, dynamic()}`, `{:error, :no_choice}`, or `{:error, :not_allowed}`.
2828

29-
Therefore, the following code should emit a violation, due to an invalid argument:
29+
Therefore, the following code in a separate module (either in a separate or the same file), should emit a violation, due to an invalid argument:
3030

3131
```elixir
3232
User.drive({:ok, %User{}}, car_choices)

0 commit comments

Comments
 (0)