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
Thomas Cenova committed Jun 7, 2024
1 parent 8086c37 commit e7bdfe0
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 @@ -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}")

Expand Down

0 comments on commit e7bdfe0

Please sign in to comment.