Skip to content

Fix #6902: Avoid illegal characters for generated given names #6903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

smarter
Copy link
Member

@smarter smarter commented Jul 21, 2019

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.

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: scala#5936.
@smarter smarter force-pushed the fix-given-encoding branch from 0484364 to f1a777b Compare July 21, 2019 19:34
@odersky odersky merged commit ec59536 into scala:master Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants