aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/macro-impl-default-params
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2015-06-18 10:58:07 +0200
committerodersky <odersky@gmail.com>2015-06-18 10:58:07 +0200
commit2ce159fa1707c1e57e22af9b2fe5a87fee94ee8d (patch)
treec13a7f302e0b949dac99249e66962230df43064a /tests/disabled/macro/run/macro-impl-default-params
parent78fae1152a7b381af4639d3d66ed637eac3ca9d0 (diff)
parent797bfd74b0900d18d62082b842f6a330ce414ebd (diff)
downloaddotty-2ce159fa1707c1e57e22af9b2fe5a87fee94ee8d.tar.gz
dotty-2ce159fa1707c1e57e22af9b2fe5a87fee94ee8d.tar.bz2
dotty-2ce159fa1707c1e57e22af9b2fe5a87fee94ee8d.zip
Merge pull request #664 from dotty-staging/more-tests
Enable tests that pass, move macro tests to disabled.
Diffstat (limited to 'tests/disabled/macro/run/macro-impl-default-params')
-rw-r--r--tests/disabled/macro/run/macro-impl-default-params/Impls_Macros_1.scala20
-rw-r--r--tests/disabled/macro/run/macro-impl-default-params/Test_2.scala4
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/macro-impl-default-params/Impls_Macros_1.scala b/tests/disabled/macro/run/macro-impl-default-params/Impls_Macros_1.scala
new file mode 100644
index 000000000..9b1d0eed3
--- /dev/null
+++ b/tests/disabled/macro/run/macro-impl-default-params/Impls_Macros_1.scala
@@ -0,0 +1,20 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.macros.blackbox.Context
+
+object Impls {
+ def foo_targs[T, U: c.WeakTypeTag](c: Context = null)(x: c.Expr[Int] = null) = {
+ import c.{prefix => prefix}
+ import c.universe._
+ val U = implicitly[c.WeakTypeTag[U]]
+ c.Expr[Unit](q"""
+ println("invoking foo_targs...")
+ println("type of prefix is: " + ${prefix.staticType.toString})
+ println("type of prefix tree is: " + ${prefix.tree.tpe.toString})
+ println("U is: " + ${U.tpe.toString})
+ """)
+ }
+}
+
+class Macros[T] {
+ def foo_targs[U](x: Int) = macro Impls.foo_targs[T, U]
+} \ No newline at end of file
diff --git a/tests/disabled/macro/run/macro-impl-default-params/Test_2.scala b/tests/disabled/macro/run/macro-impl-default-params/Test_2.scala
new file mode 100644
index 000000000..476c881f8
--- /dev/null
+++ b/tests/disabled/macro/run/macro-impl-default-params/Test_2.scala
@@ -0,0 +1,4 @@
+object Test extends dotty.runtime.LegacyApp {
+ println("foo_targs:")
+ new Macros[Int]().foo_targs[String](42)
+} \ No newline at end of file