blob: a98b227a6b3207f6114269b7fa6ccfff1b14e67d (
plain) (
blame)
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 <[email protected]>
%% Description : Tests that Dialyzer warns when it finds an unused
%% clause.
%%
%% Created : 16 Mar 2006 by Kostis Sagonas <[email protected]>
%%-------------------------------------------------------------------
-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.
|