summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-08-04 05:54:10 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-08-04 05:54:10 -0700
commit12b04bb1fb8146097b01497ad0760f8a3a13eb5b (patch)
tree4da095d388868e00dd57d043e132815e3616b3e3
parentec4a9fb5251bed30f4d99091d66190c1bd9daa03 (diff)
parent509cc5287fe03f576ebaa44d4e875e3836fe8b7f (diff)
downloadscala-12b04bb1fb8146097b01497ad0760f8a3a13eb5b.tar.gz
scala-12b04bb1fb8146097b01497ad0760f8a3a13eb5b.tar.bz2
scala-12b04bb1fb8146097b01497ad0760f8a3a13eb5b.zip
Merge pull request #1046 from scalamacros/topic/statictpe-actualtpe
staticTpe => staticType, actualTpe => actualType
-rw-r--r--src/library/scala/reflect/base/Exprs.scala10
-rw-r--r--test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala2
-rw-r--r--test/files/run/macro-impl-default-params/Impls_Macros_1.scala2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/library/scala/reflect/base/Exprs.scala b/src/library/scala/reflect/base/Exprs.scala
index 8e429afb21..ea975bba52 100644
--- a/src/library/scala/reflect/base/Exprs.scala
+++ b/src/library/scala/reflect/base/Exprs.scala
@@ -14,8 +14,8 @@ trait Exprs { self: Universe =>
def in[U <: Universe with Singleton](otherMirror: MirrorOf[U]): U # Expr[T]
def tree: Tree
- def staticTpe: Type
- def actualTpe: Type
+ def staticType: Type
+ def actualType: Type
def splice: T
val value: T
@@ -24,7 +24,7 @@ trait Exprs { self: Universe =>
override def canEqual(x: Any) = x.isInstanceOf[Expr[_]]
override def equals(x: Any) = x.isInstanceOf[Expr[_]] && this.mirror == x.asInstanceOf[Expr[_]].mirror && this.tree == x.asInstanceOf[Expr[_]].tree
override def hashCode = mirror.hashCode * 31 + tree.hashCode
- override def toString = "Expr["+staticTpe+"]("+tree+")"
+ override def toString = "Expr["+staticType+"]("+tree+")"
}
object Expr {
@@ -43,8 +43,8 @@ trait Exprs { self: Universe =>
// [Eugene++] this is important
// !!! remove when we have improved type inference for singletons
// search for .type] to find other instances
- lazy val staticTpe: Type = implicitly[AbsTypeTag[T]].tpe
- def actualTpe: Type = treeType(tree)
+ lazy val staticType: Type = implicitly[AbsTypeTag[T]].tpe
+ def actualType: Type = treeType(tree)
def splice: T = throw new UnsupportedOperationException("""
|the function you're calling has not been spliced by the compiler.
diff --git a/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala b/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala
index b32a20ba06..b260a2fdfa 100644
--- a/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala
+++ b/test/files/neg/macro-invalidsig-implicit-params/Impls_Macros_1.scala
@@ -7,7 +7,7 @@ object Impls {
import c.universe._
val body = Block(
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("invoking foo_targs...")))),
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix is: " + prefix.staticTpe)))),
+ Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix is: " + prefix.staticType)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("U is: " + implicitly[c.TypeTag[U]].tpe)))),
Literal(Constant(())))
c.Expr[Unit](body)
diff --git a/test/files/run/macro-impl-default-params/Impls_Macros_1.scala b/test/files/run/macro-impl-default-params/Impls_Macros_1.scala
index b57af2ede4..2ba28824e0 100644
--- a/test/files/run/macro-impl-default-params/Impls_Macros_1.scala
+++ b/test/files/run/macro-impl-default-params/Impls_Macros_1.scala
@@ -8,7 +8,7 @@ object Impls {
val U = implicitly[c.TypeTag[U]]
val body = Block(
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("invoking foo_targs...")))),
- Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix is: " + prefix.staticTpe)))),
+ Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix is: " + prefix.staticType)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("type of prefix tree is: " + prefix.tree.tpe)))),
Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("U is: " + U.tpe)))),
Literal(Constant(())))