Skip to content

Commit c058de0

Browse files
committed
Encode the selectDynamic names in ScalaJS
1 parent 3b5106a commit c058de0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import dotty.tools.dotc.transform.sjs.JSSymUtils.*
3636

3737
import JSEncoding.*
3838
import ScopedVar.withScopedVars
39+
import scala.reflect.NameTransformer
3940

4041
/** Main codegen for Scala.js IR.
4142
*
@@ -4218,7 +4219,7 @@ class JSCodeGen()(using genCtx: Context) {
42184219
}
42194220
}
42204221

4221-
val methodName = MethodName.reflectiveProxy(methodNameStr, formalParamTypeRefs)
4222+
val methodName = MethodName.reflectiveProxy(NameTransformer.encode(methodNameStr), formalParamTypeRefs)
42224223

42234224
js.Apply(js.ApplyFlags.empty, selectedValueTree, js.MethodIdent(methodName), actualArgs)(jstpe.AnyType)
42244225
}

0 commit comments

Comments
 (0)