scala/scala — pull request #845 by paulp (2012-07-06 21:21:16+00:00)
Title: Implicits to encourage more Name-dropping.

This creates implicits in cakes across the land from:

String => TermName
String => TypeName

And also from:

Name => NameOps[Name] // lower priority
TermName => NameOps[TermName]
TypeName => NameOps[TypeName]

What this is all about, using "drop" as a motivating example,
is that these should all work:

"abc" drop 1 // "bc": String
("abc": TermName) drop 1 // "bc": TermName
("abc": TypeName) drop 1 // "bc": TypeName
(("abc": TypeName): Name) drop 1 // "bc": Name

But this should not:

("bc": Name) // ambiguity error

This requires drop not being named on String; peer implicits
from String => TermName and String => TypeName; implicit
classes to install drop on TermName and TypeName; and a lower
priority implicit class to allow ops on Names.

Review by @xeno.by .