[erlang-questions] Dialyzer: Why do I get a 'will never return success typing error' with this recursive function?
Jeremy Raymond
jeraymond@REDACTED
Fri Feb 24 13:36:25 CET 2012
Hello,
When I dialyze this function
test(noloop) ->
ok;
test(loop) ->
test(loop). % dialyzer warns about this call
Dialyzer gives me the warning, "The call dialyzer_err:test('loop') will never return since it differs in the 1st argument from the success typing arguments: ('noloop')".
If I move the recursive call to a different function the warning does away
test(noloop) ->
ok;
test(loop) ->
do_loop(loop).
do_loop(loop) ->
do_loop(loop).
Functionally these look like they're doing the same thing to me. Why does dialyzer have issue with the first version of the function?
--
Jeremy
More information about the erlang-questions
mailing list