From e7bdfe00c593aace9013937b046d6d9fb8eaddd3 Mon Sep 17 00:00:00 2001 From: Thomas Cenova Date: Fri, 7 Jun 2024 11:20:34 -0400 Subject: [PATCH] Adding resolution of record element subtypes in packages --- pyVHDLModel/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyVHDLModel/__init__.py b/pyVHDLModel/__init__.py index bce4f90db..89eb0bc8f 100644 --- a/pyVHDLModel/__init__.py +++ b/pyVHDLModel/__init__.py @@ -836,7 +836,13 @@ def _LinkItems(package: Package): edge = item._objectVertex.EdgeToVertex(subtype._objectVertex) edge["kind"] = ObjectGraphEdgeKind.Subtype elif isinstance(item, RecordType): - print(f"record: {item}") + # Resolve each elements subtype + for element in item._elements: + subtype = package._namespace.FindSubtype(element._subtype) + element._subtype._reference = subtype + + edge = item._objectVertex.EdgeToVertex(subtype._objectVertex) + edge["kind"] = ObjectGraphEdgeKind.Subtype else: print(f"not handled: {item}")