Skip to content

Commit

Permalink
Fix inheritance with aliases [20621] (#316)
Browse files Browse the repository at this point in the history
* Refs #20619. Fix inheritance with aliases

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #20619. Update submodule

Signed-off-by: Ricardo González Moreno <[email protected]>

---------

Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware authored Mar 12, 2024
1 parent 37fc90c commit b7bdf7e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ public AliasTypeCode(
super(scope, name);
}

public boolean isHasKey()
{
boolean returnedValue = false;

if (getContentTypeCode() instanceof StructTypeCode)
{
returnedValue = ((StructTypeCode)getContentTypeCode()).isHasKey();
}

return returnedValue;
}

@Override
public long maxSerializedSize(
long current_alignment)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public boolean isHasKey()
{
boolean returnedValue = false;

if (getInheritance() != null)
if (getEnclosedInheritance() != null)
{
returnedValue |= ((StructTypeCode)getInheritance()).isHasKey();
returnedValue |= ((StructTypeCode)getEnclosedInheritance()).isHasKey();
}

for (int count = 0; count < getMembers().size() && !returnedValue; ++count)
Expand Down Expand Up @@ -143,9 +143,9 @@ public long maxPlainTypeSerializedSize(

long initial_alignment = current_alignment;

if (getInheritance() != null)
if (getEnclosedInheritance() != null)
{
current_alignment += ((StructTypeCode)getInheritance()).maxPlainTypeSerializedSize(current_alignment, align64);
current_alignment += ((StructTypeCode)getEnclosedInheritance()).maxPlainTypeSerializedSize(current_alignment, align64);
}

for (Member member : getMembers())
Expand Down

0 comments on commit b7bdf7e

Please sign in to comment.