diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-06-15 18:19:06 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-06-15 18:19:06 +0200 |
commit | 75d5eee8c7f4d83dd64bca989027925e5ff081b6 (patch) | |
tree | f03fabc0434f1543bf0420a7602ee5b1ffdeb9ce /tests/pending/pos | |
parent | a9863ab9b947180f04fd2302e86a4410dc27934b (diff) | |
download | dotty-75d5eee8c7f4d83dd64bca989027925e5ff081b6.tar.gz dotty-75d5eee8c7f4d83dd64bca989027925e5ff081b6.tar.bz2 dotty-75d5eee8c7f4d83dd64bca989027925e5ff081b6.zip |
Move tests that have " macro" or "reify" to disabled.
Diffstat (limited to 'tests/pending/pos')
56 files changed, 0 insertions, 547 deletions
diff --git a/tests/pending/pos/attachments-typed-another-ident/Impls_1.scala b/tests/pending/pos/attachments-typed-another-ident/Impls_1.scala deleted file mode 100644 index 98062a9c7..000000000 --- a/tests/pending/pos/attachments-typed-another-ident/Impls_1.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.reflect.macros.blackbox.Context -import language.experimental.macros - -object MyAttachment - -object Macros { - def impl(c: Context) = { - import c.universe._ - import internal._ - val ident = updateAttachment(Ident(TermName("bar")), MyAttachment) - assert(attachments(ident).get[MyAttachment.type].isDefined, attachments(ident)) - val typed = c.typecheck(ident) - assert(attachments(typed).get[MyAttachment.type].isDefined, attachments(typed)) - c.Expr[Int](typed) - } - - def foo = macro impl -} diff --git a/tests/pending/pos/attachments-typed-another-ident/Macros_Test_2.scala b/tests/pending/pos/attachments-typed-another-ident/Macros_Test_2.scala deleted file mode 100644 index 022639bfe..000000000 --- a/tests/pending/pos/attachments-typed-another-ident/Macros_Test_2.scala +++ /dev/null @@ -1,5 +0,0 @@ -object Test extends App { - def bar = 2 - Macros.foo -} - diff --git a/tests/pending/pos/attachments-typed-ident/Impls_1.scala b/tests/pending/pos/attachments-typed-ident/Impls_1.scala deleted file mode 100644 index 98062a9c7..000000000 --- a/tests/pending/pos/attachments-typed-ident/Impls_1.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.reflect.macros.blackbox.Context -import language.experimental.macros - -object MyAttachment - -object Macros { - def impl(c: Context) = { - import c.universe._ - import internal._ - val ident = updateAttachment(Ident(TermName("bar")), MyAttachment) - assert(attachments(ident).get[MyAttachment.type].isDefined, attachments(ident)) - val typed = c.typecheck(ident) - assert(attachments(typed).get[MyAttachment.type].isDefined, attachments(typed)) - c.Expr[Int](typed) - } - - def foo = macro impl -} diff --git a/tests/pending/pos/attachments-typed-ident/Macros_Test_2.scala b/tests/pending/pos/attachments-typed-ident/Macros_Test_2.scala deleted file mode 100644 index 45a0609de..000000000 --- a/tests/pending/pos/attachments-typed-ident/Macros_Test_2.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - def bar = 2 - Macros.foo -} diff --git a/tests/pending/pos/liftcode_polymorphic.scala b/tests/pending/pos/liftcode_polymorphic.scala deleted file mode 100644 index 249f5a056..000000000 --- a/tests/pending/pos/liftcode_polymorphic.scala +++ /dev/null @@ -1,12 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Append extends App { - - def append[A](l1: List[A], l2: List[A]):List[A] = - l1 match { - case Nil => l2 - case x::xs => x :: append(xs, l2) - } - - println(reify(append _).tree) -} diff --git a/tests/pending/pos/macro-bundle-disambiguate-bundle.check b/tests/pending/pos/macro-bundle-disambiguate-bundle.check deleted file mode 100644 index e69de29bb..000000000 --- a/tests/pending/pos/macro-bundle-disambiguate-bundle.check +++ /dev/null diff --git a/tests/pending/pos/macro-bundle-disambiguate-bundle.scala b/tests/pending/pos/macro-bundle-disambiguate-bundle.scala deleted file mode 100644 index 40d965b0e..000000000 --- a/tests/pending/pos/macro-bundle-disambiguate-bundle.scala +++ /dev/null @@ -1,14 +0,0 @@ -import scala.reflect.macros.whitebox._ -import scala.language.experimental.macros - -class Macros(val c: Context) { - def impl = ??? -} - -object Macros { - def impl(c: Context)(x: c.Tree) = ??? -} - -object Test extends App { - def foo: Unit = macro Macros.impl -} diff --git a/tests/pending/pos/macro-bundle-disambiguate-nonbundle.check b/tests/pending/pos/macro-bundle-disambiguate-nonbundle.check deleted file mode 100644 index e69de29bb..000000000 --- a/tests/pending/pos/macro-bundle-disambiguate-nonbundle.check +++ /dev/null diff --git a/tests/pending/pos/macro-bundle-disambiguate-nonbundle.scala b/tests/pending/pos/macro-bundle-disambiguate-nonbundle.scala deleted file mode 100644 index 185177607..000000000 --- a/tests/pending/pos/macro-bundle-disambiguate-nonbundle.scala +++ /dev/null @@ -1,14 +0,0 @@ -import scala.reflect.macros.whitebox._ -import scala.language.experimental.macros - -class Macros(val c: Context) { - def impl(x: c.Tree) = ??? -} - -object Macros { - def impl(c: Context) = ??? -} - -object Test extends App { - def foo: Unit = macro Macros.impl -} diff --git a/tests/pending/pos/macro-implicit-invalidate-on-error.check b/tests/pending/pos/macro-implicit-invalidate-on-error.check deleted file mode 100644 index e69de29bb..000000000 --- a/tests/pending/pos/macro-implicit-invalidate-on-error.check +++ /dev/null diff --git a/tests/pending/pos/macro-implicit-invalidate-on-error.scala b/tests/pending/pos/macro-implicit-invalidate-on-error.scala deleted file mode 100644 index bb83e3cc3..000000000 --- a/tests/pending/pos/macro-implicit-invalidate-on-error.scala +++ /dev/null @@ -1,25 +0,0 @@ -import scala.language.experimental.macros -import scala.reflect.macros.blackbox.Context - -trait LegacyLiftable[T] { - def apply(universe: scala.reflect.api.Universe, value: T): universe.Tree -} - -object LegacyLiftable { - implicit def liftCaseClass[T <: Product]: LegacyLiftable[T] = macro liftCaseClassImpl[T] - - def liftCaseClassImpl[T: c.WeakTypeTag](c: Context): c.Expr[LegacyLiftable[T]] = { - import c.universe._ - val tpe = weakTypeOf[T] - if (!tpe.typeSymbol.asClass.isCaseClass) c.abort(c.enclosingPosition, "denied") - val p = List(q"Literal(Constant(1))") - c.Expr[LegacyLiftable[T]] { q""" - new LegacyLiftable[$tpe] { - def apply(universe: scala.reflect.api.Universe, value: $tpe): universe.Tree = { - import universe._ - Apply(Select(Ident(TermName("C")), TermName("apply")), List(..$p)) - } - } - """ } - } -} diff --git a/tests/pending/pos/macro-qmarkqmarkqmark.scala b/tests/pending/pos/macro-qmarkqmarkqmark.scala deleted file mode 100644 index de94d69d5..000000000 --- a/tests/pending/pos/macro-qmarkqmarkqmark.scala +++ /dev/null @@ -1,7 +0,0 @@ -import language.experimental.macros - -object Macros { - def foo1 = macro ??? - def foo2(x: Int) = macro ??? - def foo3[T] = macro ??? -} diff --git a/tests/pending/pos/t5223.scala b/tests/pending/pos/t5223.scala deleted file mode 100644 index bfd1e153c..000000000 --- a/tests/pending/pos/t5223.scala +++ /dev/null @@ -1,6 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Foo extends App { - reify{def printf(format: String, args: Any*): String = null } - reify{def printf(format: String, args: Any*): String = ("abc": @deprecated)} -} diff --git a/tests/pending/pos/t5692a/Macros_1.scala b/tests/pending/pos/t5692a/Macros_1.scala deleted file mode 100644 index 6e5069aff..000000000 --- a/tests/pending/pos/t5692a/Macros_1.scala +++ /dev/null @@ -1,6 +0,0 @@ -import scala.reflect.macros.blackbox.Context - -object Macros { - def impl[T](c: Context) = { import c.universe._; c.Expr[Unit](q"()") } - def foo[T] = macro impl[T] -} diff --git a/tests/pending/pos/t5692a/Test_2.scala b/tests/pending/pos/t5692a/Test_2.scala deleted file mode 100644 index 72ecd9576..000000000 --- a/tests/pending/pos/t5692a/Test_2.scala +++ /dev/null @@ -1,3 +0,0 @@ -class Test { - def x = Macros.foo -} diff --git a/tests/pending/pos/t5692b/Macros_1.scala b/tests/pending/pos/t5692b/Macros_1.scala deleted file mode 100644 index 82109075f..000000000 --- a/tests/pending/pos/t5692b/Macros_1.scala +++ /dev/null @@ -1,6 +0,0 @@ -import scala.reflect.macros.blackbox.Context - -object Macros { - def impl[T, U](c: Context) = { import c.universe._; c.Expr[Unit](q"()") } - def foo[T, U] = macro impl[T, U] -} diff --git a/tests/pending/pos/t5692b/Test_2.scala b/tests/pending/pos/t5692b/Test_2.scala deleted file mode 100644 index 72ecd9576..000000000 --- a/tests/pending/pos/t5692b/Test_2.scala +++ /dev/null @@ -1,3 +0,0 @@ -class Test { - def x = Macros.foo -} diff --git a/tests/pending/pos/t5706.flags b/tests/pending/pos/t5706.flags deleted file mode 100644 index cd66464f2..000000000 --- a/tests/pending/pos/t5706.flags +++ /dev/null @@ -1 +0,0 @@ --language:experimental.macros
\ No newline at end of file diff --git a/tests/pending/pos/t5706.scala b/tests/pending/pos/t5706.scala deleted file mode 100644 index 6f0207366..000000000 --- a/tests/pending/pos/t5706.scala +++ /dev/null @@ -1,15 +0,0 @@ -import scala.reflect.macros.blackbox.{Context => BlackboxContext} -import scala.reflect.macros.whitebox.{Context => WhiteboxContext} - -class Logger { - def error1(message: String) = macro Impls.error1 - def error2(message: String) = macro Impls.error2 -} - -object Impls { - type LoggerContext1 = BlackboxContext { type PrefixType = Logger } - def error1(c: LoggerContext1)(message: c.Expr[String]): c.Expr[Unit] = ??? - - type LoggerContext2 = WhiteboxContext { type PrefixType = Logger } - def error2(c: LoggerContext2)(message: c.Expr[String]): c.Expr[Unit] = ??? -} 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) -} diff --git a/tests/pending/pos/t6047.flags b/tests/pending/pos/t6047.flags deleted file mode 100644 index cd66464f2..000000000 --- a/tests/pending/pos/t6047.flags +++ /dev/null @@ -1 +0,0 @@ --language:experimental.macros
\ No newline at end of file diff --git a/tests/pending/pos/t6047.scala b/tests/pending/pos/t6047.scala deleted file mode 100644 index e7d0c38c6..000000000 --- a/tests/pending/pos/t6047.scala +++ /dev/null @@ -1,20 +0,0 @@ -import scala.reflect.macros.blackbox.Context -import java.io.InputStream - -object Macros { - def unpack[A](input: InputStream): A = macro unpack_impl[A] - - def unpack_impl[A: c.WeakTypeTag](c: Context)(input: c.Expr[InputStream]): c.Expr[A] = { - import c.universe._ - - def unpackcode(tpe: c.Type): c.Expr[_] = { - if (tpe <:< implicitly[c.WeakTypeTag[Traversable[_]]].tpe) { - - } - ??? - } - - unpackcode(implicitly[c.WeakTypeTag[A]].tpe) - ??? - } - } diff --git a/tests/pending/pos/t6386.scala b/tests/pending/pos/t6386.scala deleted file mode 100644 index 4031ae267..000000000 --- a/tests/pending/pos/t6386.scala +++ /dev/null @@ -1,5 +0,0 @@ -import scala.reflect.runtime.universe._ - -object Test extends App { - reify(manifest[Some[_]]) -} diff --git a/tests/pending/pos/t6447.scala b/tests/pending/pos/t6447.scala deleted file mode 100644 index 6ef69d485..000000000 --- a/tests/pending/pos/t6447.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.language.experimental.macros -import scala.reflect.macros.blackbox.Context - -class X { type T } - -object X { - // this works - def foo(x: X): x.T = macro fooImpl - def fooImpl(c: Context)(x: c.Expr[X]): c.Expr[x.value.T] = ??? - - // this doesn't - def bar(x: X, y: X): (x.T, y.T) = macro barImpl - def barImpl(c: Context)(x: c.Expr[X], y: c.Expr[X]): c.Expr[(x.value.T, y.value.T)] = ??? - - // neither does this - def baz(x: X)(xs: List[x.T]): Unit = macro bazImpl - def bazImpl(c: Context)(x: c.Expr[X])(xs: c.Expr[List[x.value.T]]): c.Expr[Unit] = ??? -} diff --git a/tests/pending/pos/t6485a/Macros_1.scala b/tests/pending/pos/t6485a/Macros_1.scala deleted file mode 100644 index cc7dc3d3e..000000000 --- a/tests/pending/pos/t6485a/Macros_1.scala +++ /dev/null @@ -1,5 +0,0 @@ -import scala.reflect.macros.blackbox.Context - -object Macros { - def crash(c: Context): c.Expr[Unit] = c.universe.reify(()) -} diff --git a/tests/pending/pos/t6485a/Test_2.scala b/tests/pending/pos/t6485a/Test_2.scala deleted file mode 100644 index 54e260ac7..000000000 --- a/tests/pending/pos/t6485a/Test_2.scala +++ /dev/null @@ -1,5 +0,0 @@ -import scala.language.experimental.macros - -final class Ops[T](val x: T) extends AnyVal { - def f = macro Macros.crash -} diff --git a/tests/pending/pos/t6485b/Test.scala b/tests/pending/pos/t6485b/Test.scala deleted file mode 100644 index 46d707073..000000000 --- a/tests/pending/pos/t6485b/Test.scala +++ /dev/null @@ -1,10 +0,0 @@ -import scala.language.experimental.macros -import scala.reflect.macros.blackbox.Context - -final class Ops[T](val x: T) extends AnyVal { - def f = macro Macros.crash -} - -object Macros { - def crash(c: Context): c.Expr[Unit] = c.universe.reify(()) -} diff --git a/tests/pending/pos/t6516.scala b/tests/pending/pos/t6516.scala deleted file mode 100644 index 2980d83eb..000000000 --- a/tests/pending/pos/t6516.scala +++ /dev/null @@ -1,19 +0,0 @@ -import scala.language.experimental.macros -import scala.reflect.macros.blackbox.Context -import scala.collection.TraversableLike - -// This one compiles -object Test { - type Alias[T, CC[_]] = Context { type PrefixType = TraversableLike[T, CC[T]] } - def f() = macro f_impl - def f_impl(c: Alias[Int, List])() = ??? -} - -// This one doesn't -object Test2 { - type Ctx = scala.reflect.macros.blackbox.Context - type Alias[T, CC[_]] = Ctx { type PrefixType = TraversableLike[T, CC[T]] } - - def f() = macro f_impl - def f_impl(c: Alias[Int, List])() = ??? -} diff --git a/tests/pending/pos/t7190.scala b/tests/pending/pos/t7190.scala deleted file mode 100644 index 449e5c83f..000000000 --- a/tests/pending/pos/t7190.scala +++ /dev/null @@ -1,26 +0,0 @@ -import scala.language.experimental.macros -import scala.reflect.macros._ - -trait A[T] { - def min[U >: T](implicit ord: Numeric[U]): T = macro A.min[T, U] -} - -object A { - def min[T: c.WeakTypeTag, U >: T: c.WeakTypeTag](c: Context)(ord: c.Expr[Numeric[U]]): c.Expr[T] = { - c.universe.reify { - ord.splice.zero.asInstanceOf[T] - } - } -} - -class B extends A[Int] { - override def min[U >: Int](implicit ord: Numeric[U]): Int = macro B.min[U] -} - -object B { - def min[U >: Int: c.WeakTypeTag](c: Context)(ord: c.Expr[Numeric[U]]): c.Expr[Int] = { - c.universe.reify { - ord.splice.zero.asInstanceOf[Int] - } - } -} diff --git a/tests/pending/pos/t7377/Client_2.scala b/tests/pending/pos/t7377/Client_2.scala deleted file mode 100644 index 5728956cc..000000000 --- a/tests/pending/pos/t7377/Client_2.scala +++ /dev/null @@ -1,11 +0,0 @@ -object Test { - M.noop(List(1) match { case Nil => 0; case (x::xs) => x }) - - case class Foo(a: Int) - val FooAlias: Foo.type = Foo - M.noop(Foo(0) match { case FooAlias(_) => 0 }) - - case class Bar() - val BarAlias: Bar.type = Bar - M.noop(Bar() match { case BarAlias() => 0 }) -} diff --git a/tests/pending/pos/t7377/Macro_1.scala b/tests/pending/pos/t7377/Macro_1.scala deleted file mode 100644 index b38687c8b..000000000 --- a/tests/pending/pos/t7377/Macro_1.scala +++ /dev/null @@ -1,7 +0,0 @@ -import language.experimental._ -import scala.reflect.macros.blackbox.Context - -object M { - def noopImpl[A](c: Context)(expr: c.Expr[A]): c.Expr[A] = c.Expr(c.typecheck(c.untypecheck(expr.tree))) - def noop[A](expr: A): A = macro noopImpl[A] -} diff --git a/tests/pending/pos/t7461/Macros_1.scala b/tests/pending/pos/t7461/Macros_1.scala deleted file mode 100644 index 74ebf5af9..000000000 --- a/tests/pending/pos/t7461/Macros_1.scala +++ /dev/null @@ -1,13 +0,0 @@ -import scala.reflect.macros.blackbox.Context -import language.experimental.macros - -object Macros { - def impl(c: Context) = { - import c.universe._ - val wut = c.typecheck(Select(Literal(Constant(10)), newTermName("$minus")), silent = true) - // println(showRaw(wut, printIds = true, printTypes = true)) - c.Expr[Unit](q"()") - } - - def foo = macro impl -} diff --git a/tests/pending/pos/t7461/Test_2.scala b/tests/pending/pos/t7461/Test_2.scala deleted file mode 100644 index 866e3dc6f..000000000 --- a/tests/pending/pos/t7461/Test_2.scala +++ /dev/null @@ -1,3 +0,0 @@ -class C { - def foo = Macros.foo -} diff --git a/tests/pending/pos/t7516/A_1.scala b/tests/pending/pos/t7516/A_1.scala deleted file mode 100644 index 3bd477dcd..000000000 --- a/tests/pending/pos/t7516/A_1.scala +++ /dev/null @@ -1,9 +0,0 @@ -import scala.reflect._,macros._, scala.language.experimental.macros - -object A { - def impl[T: c.WeakTypeTag](c: Context)(t: c.Expr[T]): c.Expr[List[T]] = { - val r = c.universe.reify { List(t.splice) } - c.Expr[List[T]]( c.untypecheck(r.tree) ) - } - def demo[T](t: T): List[T] = macro impl[T] -} diff --git a/tests/pending/pos/t7516/B_2.scala b/tests/pending/pos/t7516/B_2.scala deleted file mode 100644 index 1b8531bc8..000000000 --- a/tests/pending/pos/t7516/B_2.scala +++ /dev/null @@ -1,4 +0,0 @@ -object B { - final case class CV(p: Int = 3, g: Int = 2) - A.demo { val d = 4; CV(g = d); "a" } -} diff --git a/tests/pending/pos/t7649.flags b/tests/pending/pos/t7649.flags deleted file mode 100644 index fcf951d90..000000000 --- a/tests/pending/pos/t7649.flags +++ /dev/null @@ -1 +0,0 @@ --Yrangepos
\ No newline at end of file diff --git a/tests/pending/pos/t7649.scala b/tests/pending/pos/t7649.scala deleted file mode 100644 index d70dc05ea..000000000 --- a/tests/pending/pos/t7649.scala +++ /dev/null @@ -1,20 +0,0 @@ -object Test { - val c: scala.reflect.macros.blackbox.Context = ??? - import c.universe._ - reify { - // The lookup of the implicit WeakTypeTag[Any] - // was triggering an unpositioned tree. - c.Expr[Any](q"0").splice - } - - import scala.reflect.ClassTag - def ct[A: ClassTag]: Expr[A] = ??? - def tt[A: TypeTag]: Expr[A] = ??? - def wtt[A: WeakTypeTag]: Expr[A] = ??? - - reify { - ct[String].splice - tt[String].splice - wtt[String].splice - } -} diff --git a/tests/pending/pos/t7776.check b/tests/pending/pos/t7776.check deleted file mode 100644 index e69de29bb..000000000 --- a/tests/pending/pos/t7776.check +++ /dev/null diff --git a/tests/pending/pos/t7776.scala b/tests/pending/pos/t7776.scala deleted file mode 100644 index 627d20dd6..000000000 --- a/tests/pending/pos/t7776.scala +++ /dev/null @@ -1,20 +0,0 @@ -import scala.language.experimental.macros -import scala.reflect.macros.blackbox.Context - -class MacroErasure { - def app(f: Any => Any, x: Any): Any = macro MacroErasure.appMacro - def app[A](f: A => Any, x: Any): Any = macro MacroErasure.appMacroA[A] -} - -object MacroErasure { - def appMacro(c: Context)( - f: c.Expr[Any => Any], x: c.Expr[Any]): c.Expr[Any] = { - import c.universe._ - c.Expr(q"$f($x)") - } - def appMacroA[A](c: Context)(f: c.Expr[A => Any], x: c.Expr[Any])( - implicit tt: c.WeakTypeTag[A]): c.Expr[Any] = { - import c.universe._ - c.Expr(q"$f[${tt.tpe}]($x)") - } -} diff --git a/tests/pending/pos/t7987/Macro_1.scala b/tests/pending/pos/t7987/Macro_1.scala deleted file mode 100644 index 81f717b9c..000000000 --- a/tests/pending/pos/t7987/Macro_1.scala +++ /dev/null @@ -1,6 +0,0 @@ -import scala.language.experimental._ - -object Macro { - def apply[A](a: A): A = macro impl[A] - def impl[A](c: reflect.macros.Context)(a: c.Expr[A]): c.Expr[A] = a -} diff --git a/tests/pending/pos/t7987/Test_2.scala b/tests/pending/pos/t7987/Test_2.scala deleted file mode 100644 index aaa21ec4c..000000000 --- a/tests/pending/pos/t7987/Test_2.scala +++ /dev/null @@ -1,12 +0,0 @@ -class C[T] { - def foo = 0 -} - -object Test { - implicit def AnyToC[T](a: Any): C[T] = new C[T] - // was: "macro not expanded" - Macro { - "".foo - () - } -} diff --git a/tests/pending/pos/t8001/Macros_1.scala b/tests/pending/pos/t8001/Macros_1.scala deleted file mode 100644 index 077082a9c..000000000 --- a/tests/pending/pos/t8001/Macros_1.scala +++ /dev/null @@ -1,10 +0,0 @@ -import scala.language.experimental.macros -import scala.reflect.macros.blackbox.Context - -object Macros { - def foo: Unit = macro impl - def impl(c: Context) = { - import c.universe._ - q"()" - } -} diff --git a/tests/pending/pos/t8001/Test_2.scala b/tests/pending/pos/t8001/Test_2.scala deleted file mode 100644 index 55024506e..000000000 --- a/tests/pending/pos/t8001/Test_2.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - Macros.foo - (): Unit -} diff --git a/tests/pending/pos/t8013/inpervolated_2.scala b/tests/pending/pos/t8013/inpervolated_2.scala deleted file mode 100644 index 90e571b42..000000000 --- a/tests/pending/pos/t8013/inpervolated_2.scala +++ /dev/null @@ -1,11 +0,0 @@ -/* - * scalac: -Xfatal-warnings -Xlint - */ -package t8013 - -// unsuspecting user of perverse macro -trait User { - import Perverse.Impervolator - val foo = "bar" - Console println p"Hello, $foo" -} diff --git a/tests/pending/pos/t8013/inpervolator_1.scala b/tests/pending/pos/t8013/inpervolator_1.scala deleted file mode 100644 index 612e1d727..000000000 --- a/tests/pending/pos/t8013/inpervolator_1.scala +++ /dev/null @@ -1,33 +0,0 @@ - -package t8013 - -// perverse macro to confuse Xlint - -import scala.language.experimental.macros -import scala.reflect.macros.blackbox.Context - -object Perverse { - - implicit class Impervolator(sc: StringContext) { - def p(args: Any*): String = macro pImpl - } - - // turn a nice interpolation into something that looks - // nothing like an interpolation or anything we might - // recognize, but which includes a "$id" in an apply. - def pImpl(c: Context)(args: c.Expr[Any]*): c.Expr[String] = { - import c.universe._ - val macroPos = c.macroApplication.pos - val text = macroPos.source.lineToString(macroPos.line - 1) substring macroPos.column - val tt = Literal(Constant(text)) - val tree = q"t8013.Perverse.pervert($tt)" - c.Expr[String](tree) - } - - // identity doesn't seem very perverse in this context - //def pervert(text: String): String = text - def pervert(text: String): String = { - Console println s"Perverting [$text]" - text - } -} diff --git a/tests/pending/pos/t8064/Client_2.scala b/tests/pending/pos/t8064/Client_2.scala deleted file mode 100644 index 42c9b21ce..000000000 --- a/tests/pending/pos/t8064/Client_2.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Test { - Macro { - def s = "" - Macro(s): @unchecked - ??? - } -} -// Was: a range position validation error (unpositioned tree) diff --git a/tests/pending/pos/t8064/Macro_1.scala b/tests/pending/pos/t8064/Macro_1.scala deleted file mode 100644 index 9f1e6955b..000000000 --- a/tests/pending/pos/t8064/Macro_1.scala +++ /dev/null @@ -1,10 +0,0 @@ -import language.experimental.macros -import scala.reflect.macros.blackbox.Context - -object Macro { - def apply(a: Any): Any = macro impl - - def impl(c: Context)(a: c.Tree): c.Tree = { - c.untypecheck(a) - } -} diff --git a/tests/pending/pos/t8064b/Client_2.scala b/tests/pending/pos/t8064b/Client_2.scala deleted file mode 100644 index 055b7a606..000000000 --- a/tests/pending/pos/t8064b/Client_2.scala +++ /dev/null @@ -1,6 +0,0 @@ -object Test { - Macro { - "".reverse - } -} -// Was: a range position validation error (tree with offset position enclosing tree with range position) diff --git a/tests/pending/pos/t8064b/Macro_1.scala b/tests/pending/pos/t8064b/Macro_1.scala deleted file mode 100644 index 60996bfec..000000000 --- a/tests/pending/pos/t8064b/Macro_1.scala +++ /dev/null @@ -1,11 +0,0 @@ -import language.experimental.macros -import scala.reflect.macros.blackbox.Context - -object Macro { - def apply(a: Any): Any = macro impl - def impl(c: Context)(a: c.Tree): c.Tree = { - import c.universe._ - - q"{$a; true}" - } -} diff --git a/tests/pending/pos/t8209a/Macros_1.scala b/tests/pending/pos/t8209a/Macros_1.scala deleted file mode 100644 index 5d7852cb7..000000000 --- a/tests/pending/pos/t8209a/Macros_1.scala +++ /dev/null @@ -1,17 +0,0 @@ -import scala.language.experimental.macros -import scala.language.implicitConversions -import scala.reflect.macros.blackbox.Context - -class A -object A { implicit def a2b(a: A): B = ??? } -class B -class C extends A - -object Macros { - def impl(c: Context) = { - import c.universe._ - q"new C" - } - - def foo: A = macro impl -} diff --git a/tests/pending/pos/t8209a/Test_2.scala b/tests/pending/pos/t8209a/Test_2.scala deleted file mode 100644 index bedef776f..000000000 --- a/tests/pending/pos/t8209a/Test_2.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - val a: A = Macros.foo - val b: B = Macros.foo -} diff --git a/tests/pending/pos/t8209b/Macros_1.scala b/tests/pending/pos/t8209b/Macros_1.scala deleted file mode 100644 index fa521d38d..000000000 --- a/tests/pending/pos/t8209b/Macros_1.scala +++ /dev/null @@ -1,17 +0,0 @@ -import scala.language.experimental.macros -import scala.language.implicitConversions -import scala.reflect.macros.whitebox.Context - -class A -object A { implicit def a2b(a: A): B = ??? } -class B -class C extends A - -object Macros { - def impl(c: Context) = { - import c.universe._ - q"new C" - } - - def foo: A = macro impl -} diff --git a/tests/pending/pos/t8209b/Test_2.scala b/tests/pending/pos/t8209b/Test_2.scala deleted file mode 100644 index bedef776f..000000000 --- a/tests/pending/pos/t8209b/Test_2.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - val a: A = Macros.foo - val b: B = Macros.foo -} diff --git a/tests/pending/pos/t8352/Macros_1.scala b/tests/pending/pos/t8352/Macros_1.scala deleted file mode 100644 index c1c63e57b..000000000 --- a/tests/pending/pos/t8352/Macros_1.scala +++ /dev/null @@ -1,7 +0,0 @@ -import scala.reflect.macros.whitebox._ -import scala.language.experimental.macros - -object Macros { - def impl(c: Context)(x: c.Expr[Boolean]): c.Expr[Boolean] = x - def foo(x: Boolean): Boolean = macro impl -} diff --git a/tests/pending/pos/t8352/Test_2.scala b/tests/pending/pos/t8352/Test_2.scala deleted file mode 100644 index 1f84c3ca1..000000000 --- a/tests/pending/pos/t8352/Test_2.scala +++ /dev/null @@ -1,5 +0,0 @@ -object Test extends App { - def expectUnit(): Unit = { - Macros.foo(true) - } -} |