[erlang-questions] Non terminating Dialyzer invocation in R16B03-1

Sam Tavakoli sam@REDACTED
Thu Dec 4 18:54:07 CET 2014


I'm having an interesting issue with Dialyzer in R16B03-1


-record(rec, {version}).

-opaque rec() :: #rec{version :: pos_integer()}.


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

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.

-------------- 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