diff options
author | Anders Svensson <[email protected]> | 2017-08-31 09:04:45 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-09-01 17:22:36 +0200 |
commit | a1b2f90096a70e521fdbcb2176aacf1dcc7c7f0e (patch) | |
tree | 0c33e1f7009044afc7d936d782a55bfc08322bfc /lib/diameter | |
parent | 864a7e77101e2bf44b2ce8179caef8bf4737fe29 (diff) | |
download | otp-a1b2f90096a70e521fdbcb2176aacf1dcc7c7f0e.tar.gz otp-a1b2f90096a70e521fdbcb2176aacf1dcc7c7f0e.tar.bz2 otp-a1b2f90096a70e521fdbcb2176aacf1dcc7c7f0e.zip |
Fix dialyzer spec
Which dialyzer hasn't noticed.
Diffstat (limited to 'lib/diameter')
-rw-r--r-- | lib/diameter/src/base/diameter_gen.erl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/diameter/src/base/diameter_gen.erl b/lib/diameter/src/base/diameter_gen.erl index f9172ec59d..763f70d877 100644 --- a/lib/diameter/src/base/diameter_gen.erl +++ b/lib/diameter/src/base/diameter_gen.erl @@ -45,7 +45,7 @@ -define(THROW(T), throw({?MODULE, T})). -type parent_name() :: atom(). %% parent = Message or AVP --type parent_record() :: tuple(). %% +-type parent_record() :: tuple() | avp_values() | map(). -type avp_name() :: atom(). -type avp_record() :: tuple(). -type avp_values() :: [{avp_name(), term()}]. @@ -61,9 +61,7 @@ %% # encode_avps/3 %% --------------------------------------------------------------------------- --spec encode_avps(parent_name(), - parent_record() | avp_values() | map(), - map()) +-spec encode_avps(parent_name(), parent_record(), map()) -> iolist() | no_return(). @@ -232,7 +230,7 @@ enc(AvpName, Value, Opts, Mod) -> %% --------------------------------------------------------------------------- -spec decode_avps(parent_name(), binary(), map()) - -> {parent_record(), [avp()], Failed} + -> {parent_record() | false, [avp()], Failed} when Failed :: [{5000..5999, #diameter_avp{}}]. decode_avps(Name, Bin, #{module := Mod, decode_format := Fmt} = Opts) -> |