aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_bug1.erl
blob: 5a039898538e44c441921cdfbb6e77040cb9038f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%%---------------------------------------------------------------------
%% 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.