I run dialyzer for my project. I got:
test.erl:97: The created fun has no local return
In 97 line i have:
List = lists:filter(fun(X) ->
{_, _, SomeBoolFlag} = X,
SomeBoolFlag == false
end,
TestList)
What's wrong?
Thank you.
It seems dialyzer
have found that TestList
can contain something other than {_, _, SomeBoolFlag}
tuples.
And also you can simplify this code a bit:
List = lists:filter(fun({_, _, Flag}) -> not Flag end, TestList)
or:
List = [Item || Item={_, _, false} <- TestList]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With