diff options
author | Björn Gustavsson <[email protected]> | 2014-08-18 16:01:55 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-09-01 14:37:14 +0200 |
commit | a1260b2ffa60581ce3af0728320b593cca3fd7b0 (patch) | |
tree | 2b19fb0a06cecc712cac71fa398b30cab58335bb /lib/asn1/test/testParamBasic.erl | |
parent | 5095efaac2920677510971f08908e97f379c7c3f (diff) | |
download | otp-a1260b2ffa60581ce3af0728320b593cca3fd7b0.tar.gz otp-a1260b2ffa60581ce3af0728320b593cca3fd7b0.tar.bz2 otp-a1260b2ffa60581ce3af0728320b593cca3fd7b0.zip |
Correct expansion of parameterized types
Attempting to compile:
SomeType{SOME-CLASS-NAME, SOME-CLASS-NAME:SomeSet} ::= ...
SEQUENCE {
something SOME-CLASS-NAME.&id({SomeSet})
}
would crash the compiler, because the actual parameter for
SOME-CLASS-NAME was not substituted into the governor for
the SomeSet parameter.
While we are at it, combine the functionality of is_class/2
and get_class_def/2 (eliminating is_class/2). Most callers
call both function.
Diffstat (limited to 'lib/asn1/test/testParamBasic.erl')
-rw-r--r-- | lib/asn1/test/testParamBasic.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/asn1/test/testParamBasic.erl b/lib/asn1/test/testParamBasic.erl index 3db89ca174..39f7947e8d 100644 --- a/lib/asn1/test/testParamBasic.erl +++ b/lib/asn1/test/testParamBasic.erl @@ -43,6 +43,9 @@ main(Rules) -> #'T12'{number=11,string = <<10:4>>}); _ -> ok end, + roundtrip('AnAlgorithm', {'AnAlgorithm',1,42}), + roundtrip('AnAlgorithm', {'AnAlgorithm',2,true}), + roundtrip('AnAlgorithm', {'AnAlgorithm',2,false}), ok. roundtrip(Type, Value) -> |