aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/pos/t5744
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/pending/pos/t5744
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/pending/pos/t5744')
-rw-r--r--tests/pending/pos/t5744/Macros_1.scala22
-rw-r--r--tests/pending/pos/t5744/Test_2.scala6
2 files changed, 0 insertions, 28 deletions
diff --git a/tests/pending/pos/t5744/Macros_1.scala b/tests/pending/pos/t5744/Macros_1.scala
deleted file mode 100644
index 11da37f17..000000000
--- a/tests/pending/pos/t5744/Macros_1.scala
+++ /dev/null
@@ -1,22 +0,0 @@
-import scala.language.experimental.macros
-import scala.reflect.macros.blackbox.Context
-
-object Macros {
- def foo[U: Numeric](x: U) = macro foo_impl[U]
- def bar[U: Numeric : Equiv, Y <% String](x: U)(implicit s: String) = macro bar_impl[U, Y]
-
- def foo_impl[U](c: Context)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]]) = {
- import c.universe._
- val plusOne = Apply(Select(numeric.tree, newTermName("plus")), List(x.tree, Literal(Constant(1))))
- val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(plusOne))
- c.Expr[Unit](body)
- }
-
- def bar_impl[U, Y](c: Context)(x: c.Expr[U])(numeric: c.Expr[Numeric[U]], equiv: c.Expr[Equiv[U]], viewAsString: c.Expr[Y => String], s: c.Expr[String]) = {
- import c.universe._
- val plusOne = Apply(Select(numeric.tree, newTermName("plus")), List(x.tree, Literal(Constant(1))))
- val plusLen = Apply(Select(numeric.tree, newTermName("plus")), List(plusOne, Select(s.tree, newTermName("length"))))
- val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(plusLen))
- c.Expr[Unit](body)
- }
-}
diff --git a/tests/pending/pos/t5744/Test_2.scala b/tests/pending/pos/t5744/Test_2.scala
deleted file mode 100644
index dc3de03e4..000000000
--- a/tests/pending/pos/t5744/Test_2.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-object Test extends App {
- import Macros._
- foo(42)
- implicit val s = ""
- bar(43)
-}