aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_parser2.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-12-05 12:07:10 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 12:22:56 +0100
commit831b45783976886675f853bca8a9a75ec39cda5c (patch)
tree6cac0f80023b4308cf129270c08d8b37737a15d8 /lib/asn1/src/asn1ct_parser2.erl
parent7d390a1ec41268978fbd9ad3727392ad569e8d24 (diff)
downloadotp-831b45783976886675f853bca8a9a75ec39cda5c.tar.gz
otp-831b45783976886675f853bca8a9a75ec39cda5c.tar.bz2
otp-831b45783976886675f853bca8a9a75ec39cda5c.zip
Move checking of UNIQUE & DEFAULT error to asn1ct_check
To keep the error reporting code in asn1ct_parser2 simple, we only want to handle pure syntactic errors. Therefore, move the check that UNIQUE and DEFAULT are not applied to the same field to asn1ct_check.
Diffstat (limited to 'lib/asn1/src/asn1ct_parser2.erl')
-rw-r--r--lib/asn1/src/asn1ct_parser2.erl10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/asn1/src/asn1ct_parser2.erl b/lib/asn1/src/asn1ct_parser2.erl
index c19811ea49..3960498742 100644
--- a/lib/asn1/src/asn1ct_parser2.erl
+++ b/lib/asn1/src/asn1ct_parser2.erl
@@ -1111,14 +1111,8 @@ parse_FixedTypeValueFieldSpec([{valuefieldreference,L1,VFieldName}|Rest]) ->
{OptionalitySpec,Rest5} = parse_ValueOptionalitySpec(Rest3),
case {Unique,Rest5} of
{'UNIQUE',[{Del,_}|_]} when Del =:= ','; Del =:= '}' ->
- case OptionalitySpec of
- {'DEFAULT',_} ->
- throw({asn1_error,
- {L1,get(asn1_module),
- ['UNIQUE and DEFAULT in same field',VFieldName]}});
- _ ->
- {{fixedtypevaluefield,VFieldName,Type,Unique,OptionalitySpec},Rest5}
- end;
+ {{fixedtypevaluefield,VFieldName,Type,Unique,
+ OptionalitySpec},Rest5};
{_,[{Del,_}|_]} when Del =:= ','; Del =:= '}' ->
{{object_or_fixedtypevalue_field,VFieldName,Type,Unique,OptionalitySpec},Rest5};
_ ->