From 739a730954e399e7a431b852410f684d0c92fb2f Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Mon, 6 Mar 2017 04:16:36 +0900 Subject: Disable most tests that depend on scala-reflect --- .../pos/contextbounds-implicits-new.scala | 10 ++++++++ .../scalac-dependent/pos/spec-doubledef-new.scala | 30 ++++++++++++++++++++++ tests/disabled/scalac-dependent/pos/t7688.scala | 7 +++++ tests/disabled/scalac-dependent/pos/t8187.scala | 6 +++++ 4 files changed, 53 insertions(+) create mode 100644 tests/disabled/scalac-dependent/pos/contextbounds-implicits-new.scala create mode 100644 tests/disabled/scalac-dependent/pos/spec-doubledef-new.scala create mode 100644 tests/disabled/scalac-dependent/pos/t7688.scala create mode 100644 tests/disabled/scalac-dependent/pos/t8187.scala (limited to 'tests/disabled/scalac-dependent/pos') diff --git a/tests/disabled/scalac-dependent/pos/contextbounds-implicits-new.scala b/tests/disabled/scalac-dependent/pos/contextbounds-implicits-new.scala new file mode 100644 index 000000000..8389d1332 --- /dev/null +++ b/tests/disabled/scalac-dependent/pos/contextbounds-implicits-new.scala @@ -0,0 +1,10 @@ +import scala.reflect.runtime.universe._ + +/* Tests implicit parameters in the presence of context bounds. + * See Section 7.4 of the Scala Language Specification. + */ +class C { + + def f[T: TypeTag, S: TypeTag](x: T, y: S)(implicit p: C): Unit = { } + +} diff --git a/tests/disabled/scalac-dependent/pos/spec-doubledef-new.scala b/tests/disabled/scalac-dependent/pos/spec-doubledef-new.scala new file mode 100644 index 000000000..de438d6e9 --- /dev/null +++ b/tests/disabled/scalac-dependent/pos/spec-doubledef-new.scala @@ -0,0 +1,30 @@ +import scala.reflect.runtime.universe._ + +object Test { + def fn[@specialized T, @specialized U](t : T => Int, u : U => Int) : T = + null.asInstanceOf[T] +} + +trait A[@specialized(Int) T] { + var value: T + def getWith[@specialized(Int) Z](f: T => Z) = f(value) +} + +class C extends A[Int] { + var value = 10 + override def getWith[@specialized(Int) Z](f: Int => Z) = f(value) +} + +abstract class B[T, @specialized(scala.Int) U : TypeTag, @specialized(scala.Int) V <% Ordered[V]] { + val u: U + val v: V + + def f(t: T, v2: V): Tuple2[U, V] = { + val m: Array[U] = null + if (m.isEmpty) { + (u, v) + } else { + (u, v2) + } + } +} diff --git a/tests/disabled/scalac-dependent/pos/t7688.scala b/tests/disabled/scalac-dependent/pos/t7688.scala new file mode 100644 index 000000000..5a846b97e --- /dev/null +++ b/tests/disabled/scalac-dependent/pos/t7688.scala @@ -0,0 +1,7 @@ +import scala.reflect.macros._ + +class A[C <: Context with Singleton](position: C#Position) + +object A { + def apply(c: Context)(in: c.Tree): A[c.type] = new A(in.pos) +} diff --git a/tests/disabled/scalac-dependent/pos/t8187.scala b/tests/disabled/scalac-dependent/pos/t8187.scala new file mode 100644 index 000000000..84b8cd0f4 --- /dev/null +++ b/tests/disabled/scalac-dependent/pos/t8187.scala @@ -0,0 +1,6 @@ +import scala.reflect.runtime.universe._ + +object Test extends App { + val tyn: TypeName = (??? : TypeSymbol).name + val ten: TermName = (??? : TermSymbol).name +} -- cgit v1.2.3