From f14e9fe5eda611798d95955620b3e653a2991475 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Thu, 30 Jan 2014 09:18:06 +0300 Subject: deprecates String => Name implicit conversions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Given that in 2.11 we have upgraded our name construction facility from `newTxxxName` to `TxxxName`, I think it’s time we retire these implicit conversions, as they no longer save keystrokes, but continue to present ambient danger associated with implicit conversions. --- src/reflect/scala/reflect/api/Names.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/reflect/scala/reflect/api/Names.scala b/src/reflect/scala/reflect/api/Names.scala index 23436ca8e7..30c512ab64 100644 --- a/src/reflect/scala/reflect/api/Names.scala +++ b/src/reflect/scala/reflect/api/Names.scala @@ -33,12 +33,14 @@ trait Names { * Enables an alternative notation `"map": TermName` as opposed to `newTermName("map")`. * @group Names */ + @deprecated("Use explicit `TermName(s)` instead", "2.11.0") implicit def stringToTermName(s: String): TermName = TermName(s) /** An implicit conversion from String to TypeName. * Enables an alternative notation `"List": TypeName` as opposed to `newTypeName("List")`. * @group Names */ + @deprecated("Use explicit `TypeName(s)` instead", "2.11.0") implicit def stringToTypeName(s: String): TypeName = TypeName(s) /** The abstract type of names. -- cgit v1.2.3