aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-11-11 15:09:27 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 11:40:27 +0100
commit1ba5c4caefe9d44266e8675e6a991280dddffde6 (patch)
tree2ea4161205959e9f146f5ba4adc3a7853d2bd6d7 /lib/asn1
parentfa8dfc8aa8ae99526a3dc1faa2baaadff51117fb (diff)
downloadotp-1ba5c4caefe9d44266e8675e6a991280dddffde6.tar.gz
otp-1ba5c4caefe9d44266e8675e6a991280dddffde6.tar.bz2
otp-1ba5c4caefe9d44266e8675e6a991280dddffde6.zip
Fix several levels of inlined definitions
Diffstat (limited to 'lib/asn1')
-rw-r--r--lib/asn1/src/asn1ct_check.erl4
-rw-r--r--lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn17
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 000f4668d3..b80697f805 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -1783,7 +1783,9 @@ match_syntax_objset_1(S, #type{def={'TypeFromObject', {object,Object}, FNs}},
[_|_] = Set,
#typedef{checked=true,typespec=#'ObjectSet'{class=ClassDef,set=Set}};
match_syntax_objset_1(_, #type{def=#'ObjectClassFieldType'{}}=Set, ClassDef) ->
- make_objset(ClassDef, Set).
+ make_objset(ClassDef, Set);
+match_syntax_objset_1(_, {object,_,_}=Object, ClassDef) ->
+ make_objset(ClassDef, [Object]).
make_objset(ClassDef, Set) ->
#typedef{typespec=#'ObjectSet'{class=ClassDef,set=Set}}.
diff --git a/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1 b/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1
index 6a614f546c..c70303831e 100644
--- a/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1
@@ -119,4 +119,11 @@ TestObjClassSeq{OBJ-CLASS:ObjectSet} ::= SEQUENCE {
ObjClassSeq-1 ::= TestObjClassSeq{{ObjClassSet}}
+--
+-- Test several levels of inlined definitions.
+--
+
+obj-class-obj-6 OBJ-CLASS ::= { &id 6, &Obj {{&id 100, &Data INTEGER}},
+ &Data INTEGER }
+
END