diff options
author | Björn Gustavsson <[email protected]> | 2013-03-26 11:51:59 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-05-31 14:52:22 +0200 |
commit | 8b68ddddd113ca304690136efb6889fc565aeb44 (patch) | |
tree | 49c02250e5d6a3a1073bdb83ef3f9ffd1fe968a3 /lib/asn1/src/asn1ct.erl | |
parent | a70395cd59e07a03ad003fa0cf166e1237151cb5 (diff) | |
download | otp-8b68ddddd113ca304690136efb6889fc565aeb44.tar.gz otp-8b68ddddd113ca304690136efb6889fc565aeb44.tar.bz2 otp-8b68ddddd113ca304690136efb6889fc565aeb44.zip |
Clean up checking of values for ENUMERATEDs
Unify the code for checking an enumeration value named in a
DEFAULT and in an ENUMERATED value. There is no need to handle
those cases differently. That also will also make sure that
the following works:
E ::= ENUMERATED { x, ..., y }
e E ::= x
(Extensible ENUMERATEDs were not handled when defining values.)
Always generate an error when an unknown enumeration value is
given (used in a DEFAULT, a message would be printed, but the
compilation would succeed). Also make sure that we always include
the line number for the incorrect enumeration.
Write a new test case and remove the extremely rudimentary
value_bad_enum_test/1 test case.
Diffstat (limited to 'lib/asn1/src/asn1ct.erl')
-rw-r--r-- | lib/asn1/src/asn1ct.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/asn1/src/asn1ct.erl b/lib/asn1/src/asn1ct.erl index 15aa4efe7d..8e71a5697c 100644 --- a/lib/asn1/src/asn1ct.erl +++ b/lib/asn1/src/asn1ct.erl @@ -559,6 +559,8 @@ get_pos_of_def(#pobjectdef{pos=Pos}) -> Pos; get_pos_of_def(#pobjectsetdef{pos=Pos}) -> Pos; +get_pos_of_def(#'Externalvaluereference'{pos=Pos}) -> + Pos; get_pos_of_def(_) -> undefined. |