diff options
author | odersky <odersky@gmail.com> | 2015-06-18 10:58:07 +0200 |
---|---|---|
committer | odersky <odersky@gmail.com> | 2015-06-18 10:58:07 +0200 |
commit | 2ce159fa1707c1e57e22af9b2fe5a87fee94ee8d (patch) | |
tree | c13a7f302e0b949dac99249e66962230df43064a /tests/pending/pos/t5744 | |
parent | 78fae1152a7b381af4639d3d66ed637eac3ca9d0 (diff) | |
parent | 797bfd74b0900d18d62082b842f6a330ce414ebd (diff) | |
download | dotty-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.scala | 22 | ||||
-rw-r--r-- | tests/pending/pos/t5744/Test_2.scala | 6 |
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) -} |