Skip to content

Commit

Permalink
Address review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
poorna2152 committed Nov 5, 2024
1 parent a2e04c0 commit 4b398d9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ private TypeSymbol getRawType(TypeSymbol typeDescriptor) {
private List<ObjectTypeSymbol> getObjectTypeMembers(BallerinaUnionTypeSymbol unionTypeSymbol) {
ArrayList<ObjectTypeSymbol> objectTypes = new ArrayList<>();
for (TypeSymbol member : unionTypeSymbol.memberTypeDescriptors()) {
member = getRawType(member);
if (member.typeKind() == TypeDescKind.OBJECT) {
objectTypes.add((ObjectTypeSymbol) member);
} else if (member.typeKind() == TypeDescKind.UNION) {
objectTypes.addAll(getObjectTypeMembers((BallerinaUnionTypeSymbol) member));
TypeSymbol rawType = getRawType(member);
if (rawType.typeKind() == TypeDescKind.OBJECT) {
objectTypes.add((ObjectTypeSymbol) rawType);
} else if (rawType.typeKind() == TypeDescKind.UNION) {
objectTypes.addAll(getObjectTypeMembers((BallerinaUnionTypeSymbol) rawType));
}
}
return objectTypes;
Expand Down

0 comments on commit 4b398d9

Please sign in to comment.