diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-06-03 21:51:39 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-06-03 22:46:05 +0200 |
commit | 488444b327f222fa4ef317b5d96fb7cdf732d4d2 (patch) | |
tree | 338381bd0e07faf87015c302a3cf4ba8a7204c28 /test/files | |
parent | 69887ddd682057c4787e2e4377830390faf8ecf1 (diff) | |
download | scala-488444b327f222fa4ef317b5d96fb7cdf732d4d2.tar.gz scala-488444b327f222fa4ef317b5d96fb7cdf732d4d2.tar.bz2 scala-488444b327f222fa4ef317b5d96fb7cdf732d4d2.zip |
cleans up 82f0925
Updates comments, implements accidentally forgotten IMPLPARAM_TREE,
creates a test to ensure that nothing else is overseen.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/macro-impl-relaxed.check | 4 | ||||
-rw-r--r-- | test/files/run/macro-impl-relaxed/Macros_1.scala | 14 | ||||
-rw-r--r-- | test/files/run/macro-impl-relaxed/Test_2.scala | 6 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test/files/run/macro-impl-relaxed.check b/test/files/run/macro-impl-relaxed.check new file mode 100644 index 0000000000..487b116534 --- /dev/null +++ b/test/files/run/macro-impl-relaxed.check @@ -0,0 +1,4 @@ +2 +2 +2 +2 diff --git a/test/files/run/macro-impl-relaxed/Macros_1.scala b/test/files/run/macro-impl-relaxed/Macros_1.scala new file mode 100644 index 0000000000..af62646b4e --- /dev/null +++ b/test/files/run/macro-impl-relaxed/Macros_1.scala @@ -0,0 +1,14 @@ +import language.experimental.macros +import scala.reflect.macros.Context + +object Macros { + def implUU(c: Context)(x: c.Tree): c.Tree = x + def implTU(c: Context)(x: c.Expr[Int]): c.Tree = x.tree + def implUT(c: Context)(x: c.Tree): c.Expr[Int] = c.Expr[Int](x) + def implTT(c: Context)(x: c.Expr[Int]): c.Expr[Int] = x + + def fooUU(x: Int): Int = macro implUU + def fooTU(x: Int): Int = macro implTU + def fooUT(x: Int): Int = macro implUT + def fooTT(x: Int): Int = macro implTT +}
\ No newline at end of file diff --git a/test/files/run/macro-impl-relaxed/Test_2.scala b/test/files/run/macro-impl-relaxed/Test_2.scala new file mode 100644 index 0000000000..2eaeef0fd0 --- /dev/null +++ b/test/files/run/macro-impl-relaxed/Test_2.scala @@ -0,0 +1,6 @@ +object Test extends App { + println(Macros.fooUU(2)) + println(Macros.fooTU(2)) + println(Macros.fooUT(2)) + println(Macros.fooTT(2)) +}
\ No newline at end of file |