diff options
author | Paul Phillips <paulp@improving.org> | 2013-02-27 09:23:37 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-02-27 09:23:37 -0800 |
commit | 031c5be557ed49f02ab365d64e55f30c616a5939 (patch) | |
tree | b854ad3c16c16eef1f5e017064434c7014eb52e8 /test/files | |
parent | 734300ad6d2affc68893e5d0f000d5f88dd004f4 (diff) | |
parent | 3e7db2d189ca37203b39d2c028581a0ae1281823 (diff) | |
download | scala-031c5be557ed49f02ab365d64e55f30c616a5939.tar.gz scala-031c5be557ed49f02ab365d64e55f30c616a5939.tar.bz2 scala-031c5be557ed49f02ab365d64e55f30c616a5939.zip |
Merge pull request #2134 from scalamacros/topic/resetattrs-this
resetAttrs now always erases This.tpe
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/resetattrs-this.check | 1 | ||||
-rw-r--r-- | test/files/run/resetattrs-this.scala | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/resetattrs-this.check b/test/files/run/resetattrs-this.check new file mode 100644 index 0000000000..27ba77ddaf --- /dev/null +++ b/test/files/run/resetattrs-this.check @@ -0,0 +1 @@ +true diff --git a/test/files/run/resetattrs-this.scala b/test/files/run/resetattrs-this.scala new file mode 100644 index 0000000000..12afa3d712 --- /dev/null +++ b/test/files/run/resetattrs-this.scala @@ -0,0 +1,11 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +object Test extends App { + val tb = cm.mkToolBox() + val tree = Select(This(cm.staticPackage("scala").moduleClass), newTermName("Predef")) + val ttree = tb.typeCheck(tree) + val rttree = tb.resetAllAttrs(ttree) + println(tb.eval(rttree) == Predef) +}
\ No newline at end of file |