Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown error occurred #533

Open
RaymondLoranger opened this issue Feb 26, 2024 · 3 comments
Open

Unknown error occurred #533

RaymondLoranger opened this issue Feb 26, 2024 · 3 comments

Comments

@RaymondLoranger
Copy link

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

@RaymondLoranger
Copy link
Author

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.

@jeremyjh
Copy link
Owner

jeremyjh commented Mar 8, 2024

@RaymondLoranger is there a repo I can use to reproduce the issue?

@RaymondLoranger
Copy link
Author

RaymondLoranger commented Mar 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants