1%% From: Matthias Radestock <matthias@lshift.net>
2%% Date: 19 August 2007
3%%
4%% when I run dialyzer on my code it throws the following error:
5%%
6%% Analysis failed with error report:
7%%         {{case_clause,any},
8%%          [{dialyzer_dataflow,bind_guard,5},
9%%           {dialyzer_dataflow,bind_guard_case_clauses,6},
10%%           {dialyzer_dataflow,bind_guard,5},
11%%           {dialyzer_dataflow,bind_guard_case_clauses,6},
12%%           {dialyzer_dataflow,bind_guard,5},
13%%           {dialyzer_dataflow,bind_eqeq_guard_lit_other,6},
14%%           {dialyzer_dataflow,bind_guard,...},
15%%           {dialyzer_dataflow,...}]}
16%%
17%% This is happening with the R11B-5 version of dialyzer when
18%% analyzing the attached file.
19%%--------------------------------------------------------------------
20
21-module(not_guard_crash).
22
23-export([match_ticket/2]).
24
25-record(ticket, {passive_flag, active_flag, write_flag, read_flag}).
26
27%%--------------------------------------------------------------------
28
29match_ticket(#ticket{passive_flag = PP,
30                     active_flag  = PA,
31                     write_flag   = PW,
32                     read_flag    = PR},
33             #ticket{passive_flag = TP,
34                     active_flag  = TA,
35                     write_flag   = TW,
36                     read_flag    = TR}) ->
37    if
38        %% Matches if either we're not requesting passive access, or
39        %% passive access is permitted, and ...
40        (not(TP) orelse PP) andalso
41        (not(TA) orelse PA) andalso
42        (not(TW) orelse PW) andalso
43        (not(TR) orelse PR) ->
44            match;
45        true ->
46            no_match
47    end.
48
49%%--------------------------------------------------------------------
50