summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/api/Names.scala
diff options
context:
space:
mode:
authorLukasz Piepiora <lpiepiora@gmail.com>2014-11-26 21:46:14 +0100
committerLukasz Piepiora <lpiepiora@gmail.com>2014-11-26 22:46:32 +0100
commit1f9adeee80877a33f6976977423428cede661d40 (patch)
treed2969350d46fb1953bcf327746d641b84e348c4a /src/reflect/scala/reflect/api/Names.scala
parentb6fcb5a38d4a4ff452b11f949f11b18f42896fff (diff)
downloadscala-1f9adeee80877a33f6976977423428cede661d40.tar.gz
scala-1f9adeee80877a33f6976977423428cede661d40.tar.bz2
scala-1f9adeee80877a33f6976977423428cede661d40.zip
Update ScalaDoc code examples not to use deprecated constructs
- Replace newTermName in favour of TermName - Replace newTypeName in favour of TypeName
Diffstat (limited to 'src/reflect/scala/reflect/api/Names.scala')
-rw-r--r--src/reflect/scala/reflect/api/Names.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/reflect/scala/reflect/api/Names.scala b/src/reflect/scala/reflect/api/Names.scala
index fe5f47c25d..03f7b2d218 100644
--- a/src/reflect/scala/reflect/api/Names.scala
+++ b/src/reflect/scala/reflect/api/Names.scala
@@ -17,11 +17,11 @@ import scala.language.implicitConversions
* To search for the `map` method (which is a term) declared in the `List` class, one can do:
*
* {{{
- * scala> typeOf[List[_]].member(newTermName("map"))
+ * scala> typeOf[List[_]].member(TermName("map"))
* res0: reflect.runtime.universe.Symbol = method map
* }}}
*
- * To search for a type member, one can follow the same procedure, using `newTypeName` instead.
+ * To search for a type member, one can follow the same procedure, using `TypeName` instead.
*
* For more information about creating and using `Name`s, see the [[http://docs.scala-lang.org/overviews/reflection/annotations-names-scopes.html Reflection Guide: Annotations, Names, Scopes, and More]]
*
@@ -30,14 +30,14 @@ import scala.language.implicitConversions
*/
trait Names {
/** An implicit conversion from String to TermName.
- * Enables an alternative notation `"map": TermName` as opposed to `newTermName("map")`.
+ * Enables an alternative notation `"map": TermName` as opposed to `TermName("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")`.
+ * Enables an alternative notation `"List": TypeName` as opposed to `TypeName("List")`.
* @group Names
*/
@deprecated("Use explicit `TypeName(s)` instead", "2.11.0")