-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Dialyzer warning about nil missing from spec #8717
Comments
Hello! We only have a very basic understanding of Elixir, so it would help a lot if you could translate the example to Erlang. |
Thanks for your report! This is not a warning that is enabled by default, but one that you specifically have to opt into because it may give false positives like this one. I'm inclined to believe that this is such a false positive, but if you can reduce this to an Erlang example I'll happily take a look to be sure. |
Hi, unfortunately i am not sure what the simplest erlang translation is that also exhibits the issue. What this boils down to is that i have an expression Where |
Yes, however, |
Yeah, makes sense. Ill try to look around if i can find what erlang code this is transpiled to. |
Ok so i now reduced it to this standalone elixir code:
Decompiled it to erlang with this: https://github.com/michalmuskala/decompile and got this:
Running this through gives:
|
Thanks! This is a shortcoming in |
Ok, thanks a lot for the information. I think i will keep these arguments but just suppress them in the cases where i can verify that they are false positives. Just wanted to verify that these are indeed false positives and that i didnt miss anything and also that they arent easy to address on your side. Thanks again! |
Hi,
i have these functions
and i am getting a warning from dialyzer
This does not seem correct to me, as the nil can never actually be returned due to the
||
. Is this a shortcoming of dialyzer or am i doing something wrong here?The text was updated successfully, but these errors were encountered: