aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/try1.erl
blob: 05963a16af75b3314ee84b6e57f7c054e84699dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
%%%-------------------------------------------------------------------
%%% File    : try1.erl
%%% Author  :  <[email protected]>
%%% Description :
%%%
%%% Created : 23 Aug 2005 by  <[email protected]>
%%%-------------------------------------------------------------------
-module(try1).

-export([t/1]).

t(X) ->
  case wierd_is_bool(X) of
    true -> ok;
    false -> ok
  end.

wierd_is_bool(X) ->
  try bool(X) of
      Y -> Y
  catch
    _:_  -> false
  end.

bool(true) -> true;
bool(false) -> true.