[erlang-questions] Non terminating Dialyzer invocation in R16B03-1
Sam Tavakoli
sam@REDACTED
Thu Dec 4 18:54:07 CET 2014
Hi
I'm having an interesting issue with Dialyzer in R16B03-1
-module(barf).
-record(rec, {version}).
-opaque rec() :: #rec{version :: pos_integer()}.
-export_type([rec/0]).
-export([a/1]).
a(#rec{version = 1} = A) -> A;
a(A) when is_tuple(A) -> b(1, A).
b(_, {rec, 1} =Rec) -> Rec.
dialyzer --verbose --no_check_plt --no_native --plt mini_plt
~/slask/barf.erl
This will never terminate and there is 100% CPU load.
If I swap out opaque to type, it terminates or if I remove the pattern
matching on Rec in b/2 it works.
Any ideas why this is?
Further more, Dialyzer can handle this in 17.3.
/Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141204/60fc1171/attachment.htm>
More information about the erlang-questions
mailing list