File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
compiler/src/dotty/tools/dotc/util Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ object NameTransformer {
4848 /** Replace operator symbols by corresponding expansion strings, and replace
4949 * characters that are not valid Java identifiers by "$u" followed by the
5050 * character's unicode expansion.
51+ * Note that no attempt is made to escape the use of '$' in `name`: blindly
52+ * escaping them might make it impossible to call some platform APIs. This
53+ * unfortunately means that `decode(encode(name))` might not be equal to
54+ * `name`, this is considered acceptable since '$' is a reserved character in
55+ * the Scala spec as well as the Java spec.
5156 */
5257 def encode (name : SimpleName ): SimpleName = {
5358 var buf : StringBuilder = null
You can’t perform that action at this time.
0 commit comments