summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-07-02 13:21:20 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-07-02 13:21:20 +0200
commit3becbd55aff0401f31fa6782c69c81b88befe39d (patch)
tree5af1b9f7b0b91ed513d39ab03307d513a5e01301 /src/compiler
parent3237b1cd6fc2b2029080fe9d4b2b76d43ab8011c (diff)
downloadscala-3becbd55aff0401f31fa6782c69c81b88befe39d.tar.gz
scala-3becbd55aff0401f31fa6782c69c81b88befe39d.tar.bz2
scala-3becbd55aff0401f31fa6782c69c81b88befe39d.zip
removes ClassTag.String and TypeTag.String
TypeTag.String is removed because it's unclear whether it should point to scala.Predef.String or to java.lang.String. ClassTag.String is removed to be consistent with TypeTag.String. This requires re-bootstrapping, because Definitions.scala in locker expects classTag[String] being automatically generated, whereas starr disagrees with locker on how to generate that class tag.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/reflect/makro/runtime/ExprUtils.scala2
-rw-r--r--src/compiler/scala/reflect/reify/Taggers.scala27
-rw-r--r--src/compiler/scala/tools/reflect/StdTags.scala9
3 files changed, 22 insertions, 16 deletions
diff --git a/src/compiler/scala/reflect/makro/runtime/ExprUtils.scala b/src/compiler/scala/reflect/makro/runtime/ExprUtils.scala
index 4775138e5a..e301dfc2a4 100644
--- a/src/compiler/scala/reflect/makro/runtime/ExprUtils.scala
+++ b/src/compiler/scala/reflect/makro/runtime/ExprUtils.scala
@@ -29,7 +29,7 @@ trait ExprUtils {
def literal(x: Double) = Expr[Double](Literal(Constant(x)))(TypeTag.Double)
- def literal(x: String) = Expr[String](Literal(Constant(x)))(TypeTag.String)
+ def literal(x: String) = Expr[String](Literal(Constant(x)))(TypeTag[String](definitions.StringClass.asTypeConstructor))
def literal(x: Char) = Expr[Char](Literal(Constant(x)))(TypeTag.Char)
}
diff --git a/src/compiler/scala/reflect/reify/Taggers.scala b/src/compiler/scala/reflect/reify/Taggers.scala
index b70c3f44a3..e4c3d02f22 100644
--- a/src/compiler/scala/reflect/reify/Taggers.scala
+++ b/src/compiler/scala/reflect/reify/Taggers.scala
@@ -11,20 +11,19 @@ abstract class Taggers {
import treeBuild._
val coreTags = Map(
- ByteClass.asType -> nme.Byte,
- ShortClass.asType -> nme.Short,
- CharClass.asType -> nme.Char,
- IntClass.asType -> nme.Int,
- LongClass.asType -> nme.Long,
- FloatClass.asType -> nme.Float,
- DoubleClass.asType -> nme.Double,
- BooleanClass.asType -> nme.Boolean,
- UnitClass.asType -> nme.Unit,
- AnyClass.asType -> nme.Any,
- ObjectClass.asType -> nme.Object,
- NothingClass.asType -> nme.Nothing,
- NullClass.asType -> nme.Null,
- StringClass.asType -> nme.String)
+ ByteTpe -> nme.Byte,
+ ShortTpe -> nme.Short,
+ CharTpe -> nme.Char,
+ IntTpe -> nme.Int,
+ LongTpe -> nme.Long,
+ FloatTpe -> nme.Float,
+ DoubleTpe -> nme.Double,
+ BooleanTpe -> nme.Boolean,
+ UnitTpe -> nme.Unit,
+ AnyTpe -> nme.Any,
+ ObjectTpe -> nme.Object,
+ NothingTpe -> nme.Nothing,
+ NullTpe -> nme.Null)
def materializeClassTag(prefix: Tree, tpe: Type): Tree = {
val tagModule = ClassTagModule
diff --git a/src/compiler/scala/tools/reflect/StdTags.scala b/src/compiler/scala/tools/reflect/StdTags.scala
index c782181f21..18cbf9c4b7 100644
--- a/src/compiler/scala/tools/reflect/StdTags.scala
+++ b/src/compiler/scala/tools/reflect/StdTags.scala
@@ -12,7 +12,14 @@ import scala.reflect.runtime.{universe => ru}
object StdTags {
// root mirror is fine for these guys, since scala-library.jar is guaranteed to be reachable from the root mirror
- lazy val tagOfString = ru.TypeTag.String
+ lazy val tagOfString = ru.TypeTag[String](
+ ru.rootMirror,
+ new TypeCreator {
+ def apply[U <: BaseUniverse with Singleton](m: MirrorOf[U]): U # Type = {
+ val u = m.universe
+ u.definitions.StringClass.asTypeConstructor
+ }
+ })
lazy val tagOfListOfString = ru.TypeTag[List[String]](
ru.rootMirror,
new TypeCreator {