[erlang-questions] Can't run my command line Erlang program
Fri Nov 15 04:59:48 CET 2013
I think I was trying to account for errors in parsing integers. In any
case, I think my program still works fine without this check, especially as
we agree that dialyzer proves it's unnecessary.
On Thu, Nov 14, 2013 at 8:00 PM, Kostis Sagonas <> wrote:
> On 11/15/2013 01:46 AM, Andrew Pennebaker wrote:
>> In particular, I'm confused what dialyzer doesn't like about line 60.
>> 59 FirstOne = case is_binary(FirstTemp) of
>> 60 true -> binary_to_list(FirstTemp);
>> 61 false -> FirstOneRaw
>> 62 end,
>> Not sure what's wrong. I tried using `_` instead of `false`, but got the
>> same warning. Should I use an if/else instead of case?
> Dialyzer is telling you that it thinks FirstTemp will never be a binary in
> your program, so the case statement you have there is unnecessary. So,
> effectively it tells you that you can rewrite the code above to:
> FirstOne = FirstOneRaw,
> The question is why do you expect that FirstTemp may be a binary at that
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions