diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-03-06 04:16:36 +0900 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-03-08 13:30:48 +0100 |
commit | 739a730954e399e7a431b852410f684d0c92fb2f (patch) | |
tree | 9a26aae6f6fb759b397be75933c01db9b66b6dc5 /tests/disabled/scalac-dependent/pos/spec-doubledef-new.scala | |
parent | 904d3bc1907e825f9cd9e17d1e8c538dc2a45357 (diff) | |
download | dotty-739a730954e399e7a431b852410f684d0c92fb2f.tar.gz dotty-739a730954e399e7a431b852410f684d0c92fb2f.tar.bz2 dotty-739a730954e399e7a431b852410f684d0c92fb2f.zip |
Disable most tests that depend on scala-reflect
Diffstat (limited to 'tests/disabled/scalac-dependent/pos/spec-doubledef-new.scala')
-rw-r--r-- | tests/disabled/scalac-dependent/pos/spec-doubledef-new.scala | 30 |
1 files changed, 30 insertions, 0 deletions
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) + } + } +} |