Skip to content

Commit

Permalink
Remove unescape logic from JvmDesugarPhase
Browse files Browse the repository at this point in the history
  • Loading branch information
HindujaB committed Nov 16, 2023
1 parent e25404e commit 20c18d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package org.wso2.ballerinalang.compiler.bir;

import io.ballerina.identifier.Utils;
import io.ballerina.tools.diagnostics.Location;
import io.ballerina.tools.text.LinePosition;
import io.ballerina.tools.text.LineRange;
Expand Down Expand Up @@ -367,7 +368,7 @@ public void visit(BLangTypeDefinition astTypeDefinition) {
if (referredType.tag == TypeTags.RECORD) {
BRecordType recordType = (BRecordType) referredType;
if (recordType.shouldPrintShape()) {
displayName = new Name(recordType.toString());
displayName = new Name(Utils.unescapeBallerina(recordType.toString()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ private static void encodePackageIdentifiers(PackageID packageID, HashMap<String
private static void encodeTypeDefIdentifiers(List<BIRTypeDefinition> typeDefs,
HashMap<String, String> encodedVsInitialIds) {
for (BIRTypeDefinition typeDefinition : typeDefs) {
if (Symbols.isFlagOn(typeDefinition.type.flags, Flags.ANONYMOUS)) {
typeDefinition.name = Names.fromString(Utils.unescapeBallerina(typeDefinition.name.value));
}
typeDefinition.type.tsymbol.name = Names.fromString(encodeNonFunctionIdentifier(
typeDefinition.type.tsymbol.name.value, encodedVsInitialIds));
typeDefinition.internalName =
Expand Down

0 comments on commit 20c18d1

Please sign in to comment.