Skip to content

Commit 47a4c66

Browse files
committed
fix mangled string
1 parent 07150fd commit 47a4c66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/backend/sjs/JSEncoding.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ object JSEncoding {
206206
*/
207207
ir.Definitions.BoxedUnitClass
208208
} else {
209-
ir.Definitions.encodeClassName(sym.fullName.toString)
209+
ir.Definitions.encodeClassName(fullyMangledString(sym.fullName))
210210
}
211211
}
212212

@@ -231,7 +231,7 @@ object JSEncoding {
231231
val c = base.charAt(i)
232232
if (c == '_')
233233
result.append("$und")
234-
else if (Character.isJavaIdentifierPart(c))
234+
else if (Character.isJavaIdentifierPart(c) || c == '.')
235235
result.append(c)
236236
else
237237
result.append("$u%04x".format(c.toInt))

0 commit comments

Comments
 (0)