Dialyzer warning

46 views
Skip to first unread message

Robert Dober

unread,
Jun 11, 2016, 6:15:10 AM6/11/16
to elixir-l...@googlegroups.com
I would appreciate if somebody could give me a hint how to get rid of this warning
cli.ex:56: The call 'Elixir.File':open(filename@1::binary(),['utf8',...]) breaks the contract ('Elixir.Path':t(),fun((io_device()) -> res)) -> {'ok',res} | {'error',posix()}
    ; ('Elixir.Path':t(),[mode() | 'ram']) -> {'ok',io_device()} | {'error',posix()} in the 2nd argument
for the code

defp open_file(filename), do: io_device(File.open(filename, [:utf8]), filename)       

I googled for this (proabably badly) and tried to tweak the code (probably beadly) to no success.

Thx in advance

Robert
--
Progress is impossible without change, and those who cannot change their minds cannot change anything.
-- George Bernard Shaw

José Valim

unread,
Jun 11, 2016, 6:19:55 AM6/11/16
to elixir-l...@googlegroups.com
I believe this is caused a bug in Elixir where our specs were out of date. It should be fixed in Elixir v1.3.0-rc.1.



José Valim
Skype: jv.ptec
Founder and Director of R&D

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CA%2Bvts6saZxa62NJ3yt7qi6vVB-s41wtxEd%2BBbvVWqFfuJo3gAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Robert Dober

unread,
Jun 12, 2016, 8:22:51 AM6/12/16
to elixir-lang-talk, jose....@plataformatec.com.br
muito obrigado
Reply all
Reply to author
Forward
0 new messages