Skip to content

Commit

Permalink
Fix failing non-anon record value creation
Browse files Browse the repository at this point in the history
  • Loading branch information
HindujaB committed Nov 22, 2023
1 parent 8bc2d15 commit 0974f3f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,11 @@ public void visit(BLangTypeDefinition astTypeDefinition) {
BType type = getDefinedType(astTypeDefinition);
BType referredType = Types.getImpliedType(type);
BSymbol symbol = astTypeDefinition.symbol;
Name displayName = symbol.name;
String displayName = symbol.name.value;
if (referredType.tag == TypeTags.RECORD) {
BRecordType recordType = (BRecordType) referredType;
if (recordType.shouldPrintShape()) {
displayName = new Name(Utils.unescapeBallerina(recordType.toString()));
displayName = recordType.toString();
}
}

Expand All @@ -379,7 +379,7 @@ public void visit(BLangTypeDefinition astTypeDefinition) {
type,
new ArrayList<>(),
symbol.origin.toBIROrigin(),
displayName,
new Name(Utils.unescapeBallerina(displayName)),
symbol.originalName);
if (symbol.tag == SymTag.TYPE_DEF) {
BTypeReferenceType referenceType = ((BTypeDefinitionSymbol) symbol).referenceType;
Expand Down

0 comments on commit 0974f3f

Please sign in to comment.