1
%%---------------------------------------------------------------------
2
%% A user complained that dialyzer produces a weird warning for the
3
%% following program. I explained to him that there is an implicit
4
%% assumption that when a record is typed one cannot have types of
5
%% the same size which are tagged by the record name whose elements
6
%% have different types than the ones declared in the record.
8
%% But the warning from dialyzer was weird nonetheless:
9
%% The pattern {'r', [_]} can never match the type any()
10
%% We should clearly give some less confusing warning in this case.
11
%%---------------------------------------------------------------------
12
-module(confusing_record_warning).
16
-record(r, {field :: binary}).