From 0974f3f1aa9d4b03e1585d91c77db1bd3a22546a Mon Sep 17 00:00:00 2001 From: hindujaB Date: Wed, 22 Nov 2023 13:32:21 +0530 Subject: [PATCH] Fix failing non-anon record value creation --- .../java/org/wso2/ballerinalang/compiler/bir/BIRGen.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/BIRGen.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/BIRGen.java index 594705c1aa9a..41e0949ef222 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/BIRGen.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/bir/BIRGen.java @@ -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(); } } @@ -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;