aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen_per.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-02-28 10:38:01 +0100
committerBjörn Gustavsson <[email protected]>2017-03-14 09:47:40 +0100
commit1831c36cc0d7c98917ae3bd274071c9c450a9c02 (patch)
tree3df94e8fd33afff20d2069603e4c01c729656e8e /lib/asn1/src/asn1ct_gen_per.erl
parent3334c0c7b831ecf47738c713fd764eef891a298a (diff)
downloadotp-1831c36cc0d7c98917ae3bd274071c9c450a9c02.tar.gz
otp-1831c36cc0d7c98917ae3bd274071c9c450a9c02.tar.bz2
otp-1831c36cc0d7c98917ae3bd274071c9c450a9c02.zip
asn1ct_gen_per: Fix broken dialyzer suppression function
ce431409d0daba broke generation of dialyzer suppressions for per and uper. While we are it, add type tests to asn1ct_func:is_used/1 to avoid similar problems in the future.
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per.erl')
-rw-r--r--lib/asn1/src/asn1ct_gen_per.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl
index 9671a566bf..79e96c1aab 100644
--- a/lib/asn1/src/asn1ct_gen_per.erl
+++ b/lib/asn1/src/asn1ct_gen_per.erl
@@ -42,8 +42,12 @@
%% Generate ENCODING ******************************
%%****************************************x
-dialyzer_suppressions(Erules) ->
- case asn1ct_func:is_used({Erules,complete,1}) of
+dialyzer_suppressions(#gen{erule=per,aligned=Aligned}) ->
+ Mod = case Aligned of
+ false -> uper;
+ true -> per
+ end,
+ case asn1ct_func:is_used({Mod,complete,1}) of
false ->
ok;
true ->