support for a class of circular references
diff --git a/tests/72-same-names-OK.asn1.-P b/tests/72-same-names-OK.asn1.-P
index 3dc4418..a359a74 100644
--- a/tests/72-same-names-OK.asn1.-P
+++ b/tests/72-same-names-OK.asn1.-P
@@ -7,13 +7,8 @@
#include <constr_SEQUENCE.h>
#include <constr_SET_OF.h>
-/*** <<< DEPS [Type] >>> ***/
-
-extern asn_TYPE_descriptor_t asn_DEF_Type;
-
/*** <<< TYPE-DECLS [Type] >>> ***/
-
typedef struct Type {
A_SET_OF(struct Member {
Type1_t t1;
@@ -27,6 +22,10 @@
asn_struct_ctx_t _asn_ctx;
} Type_t;
+/*** <<< FUNC-DECLS [Type] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Type;
+
/*** <<< STAT-DEFS [Type] >>> ***/
static asn_TYPE_member_t asn_MBR_Member_2[] = {
@@ -136,11 +135,9 @@
one_name_PR_NOTHING, /* No components present */
one_name_PR_another_name,
} one_name_PR;
-extern asn_TYPE_descriptor_t asn_DEF_Type1;
/*** <<< TYPE-DECLS [Type1] >>> ***/
-
typedef struct Type1 {
struct one_name {
one_name_PR present;
@@ -162,6 +159,10 @@
asn_struct_ctx_t _asn_ctx;
} Type1_t;
+/*** <<< FUNC-DECLS [Type1] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Type1;
+
/*** <<< STAT-DEFS [Type1] >>> ***/
static asn_TYPE_member_t asn_MBR_another_name_3[] = {
@@ -328,11 +329,9 @@
typedef enum two_name_PR {
two_name_PR_another_name, /* Member another_name is present */
} two_name_PR;
-extern asn_TYPE_descriptor_t asn_DEF_Type2;
/*** <<< TYPE-DECLS [Type2] >>> ***/
-
typedef struct Type2 {
Type2_PR present;
union {
@@ -370,6 +369,10 @@
asn_struct_ctx_t _asn_ctx;
} Type2_t;
+/*** <<< FUNC-DECLS [Type2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Type2;
+
/*** <<< CODE [Type2] >>> ***/
static int