Unknown error occurred
Erlang/OTP 26 [erts-14.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns] Elixir 1.16.1 (compiled with Erlang/OTP 26) Dialyxir 1.4.3
Please file a bug in https://github.com/jeremyjh/dialyxir/issues with this message.
Unknown error occurred: %FunctionClauseError{module: Dialyxir.Warnings.InvalidContract, function: :format_long, arity: 1, kind: nil, args: nil, clauses: nil}
Legacy warning: lib/hangman/engine.ex:78: Invalid type specification for function 'Elixir.Hangman.Engine':make_move/2. The success typing is 'Elixir.Hangman.Engine':make_move(binary(),binary()) -> any() But the spec is 'Elixir.Hangman.Engine':make_move('Elixir.Hangman.Game':name(),'Elixir.Hangman.Game':letter()) -> 'Elixir.Hangman.Game':tally() They do not overlap in the 2nd argument
done (warnings were emitted) Halting VM with exit status 2
Initially, module Hangman.Game had letter defined as String.codepoint() and I had no error messages. But then I changed the type to byte and it caused this error message.
@RaymondLoranger is there a repo I can use to reproduce the issue?
Hi Jeremy,
Yes, there is a repo (it is a hex package): https://hex.pm/packages/hangman_game
To reproduce the issue you would need to replace lib/hangman/game.ex:22 from
@type letter :: <<_::8>>
to
@type letter :: byte
Regards,
Raymond
From: Jeremy Huffman @.> Sent: Friday, March 8, 2024 11:23 AM To: jeremyjh/dialyxir @.> Cc: Raymond Loranger @.>; Mention @.> Subject: Re: [jeremyjh/dialyxir] Unknown error occurred (Issue #533)
@RaymondLoranger https://github.com/RaymondLoranger is there a repo I can use to reproduce the issue?
— Reply to this email directly, view it on GitHub https://github.com/jeremyjh/dialyxir/issues/533#issuecomment-1985995271 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAZL5CL762YDJGYUQSSMSDYXHQX7AVCNFSM6AAAAABDZNO47KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBVHE4TKMRXGE . You are receiving this because you were mentioned.Message ID: @.***>