~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/dialyzer/test/small_SUITE_data/src/not_guard_crash.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
29
match_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
%%--------------------------------------------------------------------