aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
diff options
context:
space:
mode:
authorGustav Simonsson <[email protected]>2012-02-13 10:39:05 +0100
committerGustav Simonsson <[email protected]>2012-02-13 10:39:05 +0100
commit6c2e966d4fccf7ec60795a3293492862f76aba5c (patch)
treead0f94e0bfc66c8d5b1dd67794ad3974bb9a2a6f /lib/asn1/src/asn1ct_gen_per_rt2ct.erl
parent86231a380b27fc262e48aa8c3f0372d4d2056682 (diff)
downloadotp-6c2e966d4fccf7ec60795a3293492862f76aba5c.tar.gz
otp-6c2e966d4fccf7ec60795a3293492862f76aba5c.tar.bz2
otp-6c2e966d4fccf7ec60795a3293492862f76aba5c.zip
Fix to integer and sequence definitions
Enable re-use of integer definitions in subsequent definitions and added clauses to check greatest common range for sequence definitions
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per_rt2ct.erl')
-rw-r--r--lib/asn1/src/asn1ct_gen_per_rt2ct.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
index 1a0a0e211d..fb9613c18d 100644
--- a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
+++ b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
@@ -704,6 +704,10 @@ greatest_common_range([{_,Int}],VR=[{_,{_Lb,_Ub}}]) when is_integer(Int) ->
greatest_common_range([{_,L}],[{_,{Lb,Ub}}]) when is_list(L) ->
Min = least_Lb([Lb|L]),
Max = greatest_Ub([Ub|L]),
+ [{'ValueRange',{Min,Max}}];
+greatest_common_range([{_,{Lb1,Ub1}}],[{_,{Lb2,Ub2}}]) ->
+ Min = least_Lb([Lb1,Lb2]),
+ Max = greatest_Ub([Ub1,Ub2]),
[{'ValueRange',{Min,Max}}].