summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/api
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-02-17 23:18:50 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-02-18 09:23:38 +0100
commitafecfe90cd98a657ce83f3e833c940518563064e (patch)
tree23f0dd8d4a1a9aebf47f098c65c83746da4f0efc /src/reflect/scala/reflect/api
parent34532d7e92b8ed2a9411260007fcfcc00f377ccc (diff)
downloadscala-afecfe90cd98a657ce83f3e833c940518563064e.tar.gz
scala-afecfe90cd98a657ce83f3e833c940518563064e.tar.bz2
scala-afecfe90cd98a657ce83f3e833c940518563064e.zip
reverses SI-6484
Unfortunately I have to revert b017629 because of SI-8303. There are projects (e.g. slick) that use typeOf in annotations, which effectively means bye-bye.
Diffstat (limited to 'src/reflect/scala/reflect/api')
-rw-r--r--src/reflect/scala/reflect/api/TypeTags.scala16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/reflect/scala/reflect/api/TypeTags.scala b/src/reflect/scala/reflect/api/TypeTags.scala
index 1d5bf5d28b..1dfc84be69 100644
--- a/src/reflect/scala/reflect/api/TypeTags.scala
+++ b/src/reflect/scala/reflect/api/TypeTags.scala
@@ -326,25 +326,13 @@ trait TypeTags { self: Universe =>
* Shortcut for `implicitly[WeakTypeTag[T]].tpe`
* @group TypeTags
*/
- def weakTypeOf[T](implicit attag: WeakTypeTag[T]): Type = if (attag != null) attag.tpe else typeOf[Null]
-
- /**
- * Type of `x` as derived from a weak type tag.
- * @group TypeTags
- */
- def weakTypeOf[T: WeakTypeTag](x: => T): Type = weakTypeOf[T]
+ def weakTypeOf[T](implicit attag: WeakTypeTag[T]): Type = attag.tpe
/**
* Shortcut for `implicitly[TypeTag[T]].tpe`
* @group TypeTags
*/
- def typeOf[T](implicit ttag: TypeTag[T]): Type = if (ttag != null) ttag.tpe else typeOf[Null]
-
- /**
- * Type of `x` as derived from a type tag.
- * @group TypeTags
- */
- def typeOf[T: TypeTag](x: => T): Type = typeOf[T]
+ def typeOf[T](implicit ttag: TypeTag[T]): Type = ttag.tpe
/**
* Type symbol of `x` as derived from a type tag.