aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/opaque_tests_SUITE_data/src/opaque/opaque_bug1.erl
blob: ff0b1d05ab65fbfb8abc4b6b86e1ecf3943acf21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
%%---------------------------------------------------------------------
%% A test for which the analysis went into an infinite loop due to
%% specialization using structured type instead of the opaque one.
%%---------------------------------------------------------------------

-module(opaque_bug1).

-export([test/1]).

-record(c, {a::atom()}).

-opaque erl_type() :: 'any' | #c{}.

test(#c{a=foo} = T) -> local(T).

local(#c{a=foo}) -> any.