aboutsummaryrefslogblamecommitdiffstats
path: root/lib/dialyzer/test/opaque_SUITE_data/src/weird/weird_warning1.erl
blob: 094138e72b50c1fb2f4619cdd2e4d33f44b91322 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                          
-module(weird_warning1).
-export([public_func/0]).

-record(a, {
          d = dict:new() :: dict:dict()
         }).

-record(b, {
          q = queue:new() :: queue:queue()
         }).

public_func() ->
    add_element(#b{}, my_key, my_value).

add_element(#a{d = Dict}, Key, Value) ->
    dict:store(Key, Value, Dict);
add_element(#b{q = Queue}, Key, Value) ->
    queue:in({Key, Value}, Queue).