diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-01-14 00:34:24 -0800 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-01-14 00:34:24 -0800 |
commit | ef4c5d2f43e912b5562c1372228e9c6ec9f25bb0 (patch) | |
tree | bb7385f1971d1b7869eed8678fb0bfef24082e60 /test/files/run/macro-bundle-static | |
parent | 4065b5136f2d0d1b6b9bb03f6669c1fd8a2b4e64 (diff) | |
parent | b2f67b5730adccc4cbb24e5b542dc66452869489 (diff) | |
download | scala-ef4c5d2f43e912b5562c1372228e9c6ec9f25bb0.tar.gz scala-ef4c5d2f43e912b5562c1372228e9c6ec9f25bb0.tar.bz2 scala-ef4c5d2f43e912b5562c1372228e9c6ec9f25bb0.zip |
Merge pull request #3355 from xeno-by/topic/saturday-night
reshuffles names for blackbox/whitebox contexts, changes bundle notation
Diffstat (limited to 'test/files/run/macro-bundle-static')
-rw-r--r-- | test/files/run/macro-bundle-static/Impls_Macros_1.scala | 6 | ||||
-rw-r--r-- | test/files/run/macro-bundle-static/Test_2.scala | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/files/run/macro-bundle-static/Impls_Macros_1.scala b/test/files/run/macro-bundle-static/Impls_Macros_1.scala index b859411325..0142e5d945 100644 --- a/test/files/run/macro-bundle-static/Impls_Macros_1.scala +++ b/test/files/run/macro-bundle-static/Impls_Macros_1.scala @@ -1,8 +1,8 @@ -import scala.reflect.macros.BlackboxMacro +import scala.reflect.macros.blackbox.Context import scala.language.experimental.macros object Enclosing { - trait Impl extends BlackboxMacro { + class Impl(val c: Context) { def mono = { import c.universe._; c.Expr[Unit](q"()") } def poly[T: c.WeakTypeTag] = { import c.universe._; c.Expr[String](q"${c.weakTypeOf[T].toString}") } def weird = macro mono @@ -16,7 +16,7 @@ object Macros { package pkg { object Enclosing { - trait Impl extends BlackboxMacro { + class Impl(val c: Context) { def mono = { import c.universe._; c.Expr[Boolean](q"true") } def poly[T: c.WeakTypeTag] = { import c.universe._; c.Expr[String](q"${c.weakTypeOf[T].toString + c.weakTypeOf[T].toString}") } def weird = macro mono diff --git a/test/files/run/macro-bundle-static/Test_2.scala b/test/files/run/macro-bundle-static/Test_2.scala index 72160f6ec2..e35260cdce 100644 --- a/test/files/run/macro-bundle-static/Test_2.scala +++ b/test/files/run/macro-bundle-static/Test_2.scala @@ -1,8 +1,8 @@ object Test extends App { println(Macros.mono) println(Macros.poly[Int]) - println(new Enclosing.Impl{val c = ???}.weird) + println(new Enclosing.Impl(???).weird) println(pkg.Macros.mono) println(pkg.Macros.poly[Int]) - println(new pkg.Enclosing.Impl{val c = ???}.weird) + println(new pkg.Enclosing.Impl(???).weird) }
\ No newline at end of file |