File 0623-Fix-compiling-value-of-CHOICE-with-extensions.patch of Package erlang

From 5c9dd56af4e051003ce7b8b5dd4cf50bf9eefdbe Mon Sep 17 00:00:00 2001
From: Simon Cornish <zl9d97p02@sneakemail.com>
Date: Fri, 22 Feb 2019 18:18:12 -0800
Subject: [PATCH 4/6] Fix compiling value of CHOICE with extensions

---
 lib/asn1/src/asn1ct_check.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 1a7551b8d8..9ced905294 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -2754,8 +2754,9 @@ check_type(S=#state{recordtopname=TopName},Type,Ts) when is_record(Ts,type) ->
 		TempNewDef#newt{type={'SEQUENCE OF',check_sequenceof(S,Type,Components)},
 				tag=
 				merge_tags(Tag,?TAG_CONSTRUCTED(?N_SEQUENCE))};
-	    {'CHOICE',Components} ->
+	    {'CHOICE',_} = Choice->
 		Ct = maybe_illicit_implicit_tag(S, choice, Tag),
+                Components = get_choice_components(S, Choice),
 		TempNewDef#newt{type={'CHOICE',check_choice(S,Type,Components)},tag=Ct};
 	    Set when is_record(Set,'SET') ->
 		RecordName=
-- 
2.16.4