[erlang-bugs] dialyzer does not like queue:out
Kostis Sagonas
kostis@REDACTED
Sat Jul 16 19:15:07 CEST 2011
Paul Guyot wrote:
> Hello,
>
> Dialyzer seems to consider that the second element of the output of queue:out/1 is not a queue.
>
> The following code reproduces the error:
>
> ...
> Dialyzer will say:
>
> dialyzer_queue.erl:11: The pattern {'ok', _Value, _NewRec} can never match the type {'none',#rec{q::queue()}}
>
> The error disappears if g returns {ok, Elem, Rec} instead of {ok, Elem, #rec{q = NewQueue}}, or if rec.q is typed as any().
This is a known problem.
Can you please try the 'dev' version because I think it is fixed there.
Kostis
More information about the erlang-bugs
mailing list