-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Elixir and Erlang/OTP versions
$ elixir --version
Erlang/OTP 28 [erts-16.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Elixir 1.19.3 (compiled with Erlang/OTP 28)
Operating system
macOS 14.7.6 (23H626)
Current behavior
When I run dialyzer via dialyxir (1.4.7), this line of code:
Code.format_string!("", line_length: 120, force_do_end_blocks: true)produces this error:
The function call will not succeed.
Code.format_string!(<<>>, [{:line_length, 120}, {:force_do_end_blocks, true}])
will never return since the 2nd arguments differ
from the success typing arguments:
(binary(), [
{:column
| :columns
| :emit_warnings
| :existing_atoms_only
| :file
| :indentation
| :line
| :literal_encoder
| :static_atoms_encoder
| :token_metadata
| :unescape, boolean() | binary() | (... -> any) | non_neg_integer()}
])
In Elixir 1.18.1, this code did not produce any dialyzer error. AFAIK the API of this function didn't change. I'm using the formatting options that are listed in the docs: https://hexdocs.pm/elixir/Code.html#t:format_opt/0
Expected behavior
No dialyzer errors.
Metadata
Metadata
Assignees
Labels
No labels