Commit f1a777b
committed
Fix #6902: Avoid illegal characters for generated given names
Name encoding does not kick in automatically for operator symbols which
appear in a prefix of a name, so the name `<<<_of_A_given` was kept as
is, which is problematic since `<` is not valid in method names on the
JVM (in `i6902.scala`, `<<<<` runs fine even before this change, because
monomorphic givens are implemented as objects, not defs).
Having to remember to call `avoidIllegalChars` isn't great, but fixing
that should be part of a bigger refactoring of name mangling we still
need to do: #5936.1 parent 54b08e1 commit f1a777b
File tree
2 files changed
+10
-1
lines changed- compiler/src/dotty/tools/dotc/ast
- tests/run
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
898 | | - | |
| 898 | + | |
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments