summaryrefslogtreecommitdiff
path: root/lib/dialyzer/test/small_SUITE_data/src/unused_clauses.erl
blob: a98b227a6b3207f6114269b7fa6ccfff1b14e67d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
%%-------------------------------------------------------------------
%% File    : unused_clauses.erl
%% Author  : Kostis Sagonas <kostis@it.uu.se>
%% Description : Tests that Dialyzer warns when it finds an unused
%%		 clause.
%%
%% Created : 16 Mar 2006 by Kostis Sagonas <kostis@it.uu.se>
%%-------------------------------------------------------------------

-module(unused_clauses).
-export([test/0]).

test() -> {t(atom), t({42})}.

t(X) when is_atom(X) -> X;
t(X) when is_integer(X) -> X;
t(X) when is_tuple(X) -> element(1, X);
t(X) when is_binary(X) -> X.