Get rid of the last implicit conversions from String to Names.#8537
Merged
retronym merged 2 commits intoscala:2.13.xfrom Nov 20, 2019
Merged
Get rid of the last implicit conversions from String to Names.#8537retronym merged 2 commits intoscala:2.13.xfrom
retronym merged 2 commits intoscala:2.13.xfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This requires a fair amount of explicit calls to
createNameTypeinStdNames, which is not pleasing to the eye, but the result is a saner codebase nevertheless.We use the opportunity to replace the
n"foo"interopolator trick, which was used to avoid spurious "possible missing interpolator" warnings, by a simple concatenation like"$" + "foo".In the
scala-reflectAPI, we do not remove the methods to preserve binary compatibility. We simply drop theirimplicitmarker, which is not source compatible but is binary compatible.After that, we integrate methods of
NameOpsdirectly inName.Now that there are no more implicit conversion from
StringtoNames, we can safely put those methods directly inName, which is better for performance and readability. Previously, doing so would cause ambiguous implicit conversions between those andPredef.augmentString./cc @diesalbla @hrhino
Inspired by #8535.