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 {
48
48
/** Replace operator symbols by corresponding expansion strings, and replace
49
49
* characters that are not valid Java identifiers by "$u" followed by the
50
50
* 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.
51
56
*/
52
57
def encode (name : SimpleName ): SimpleName = {
53
58
var buf : StringBuilder = null
You can’t perform that action at this time.
0 commit comments