Skip to content

Commit

Permalink
Adding resolution of record element subtypes in packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels authored Jun 8, 2024
2 parents b0aac44 + e7bdfe0 commit 7c01493
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pyVHDLModel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,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}")

Expand Down

0 comments on commit 7c01493

Please sign in to comment.