diff options
author | Martin Odersky <odersky@gmail.com> | 2016-04-09 12:28:06 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-04-09 12:29:14 +0200 |
commit | 6942127668d0c9fe60e4b11d952adf2f7e1fee72 (patch) | |
tree | 0c3f7c0e0b976ff78d15e77feb640bbde52b99c8 /tests/pending | |
parent | 0907f5bd5cc9f57b01c5b73403463c20b857d632 (diff) | |
download | dotty-6942127668d0c9fe60e4b11d952adf2f7e1fee72.tar.gz dotty-6942127668d0c9fe60e4b11d952adf2f7e1fee72.tar.bz2 dotty-6942127668d0c9fe60e4b11d952adf2f7e1fee72.zip |
Rearrange pickle tests
1) Move passing test to pickling
2) Add test case for #1212 in pending
3) Disable annotations/internal in pickling tests. They lead to a stable symbol error
which is explainable (modifiers are read before symbol is created).
Diffstat (limited to 'tests/pending')
-rw-r--r-- | tests/pending/pickling/cyclic-annotations.scala | 1 | ||||
-rw-r--r-- | tests/pending/pickling/i94-nada.scala | 45 |
2 files changed, 1 insertions, 45 deletions
diff --git a/tests/pending/pickling/cyclic-annotations.scala b/tests/pending/pickling/cyclic-annotations.scala new file mode 100644 index 000000000..b975afe37 --- /dev/null +++ b/tests/pending/pickling/cyclic-annotations.scala @@ -0,0 +1 @@ +@ann class ann extends scala.annotation.Annotation diff --git a/tests/pending/pickling/i94-nada.scala b/tests/pending/pickling/i94-nada.scala deleted file mode 100644 index ce8dc98ad..000000000 --- a/tests/pending/pickling/i94-nada.scala +++ /dev/null @@ -1,45 +0,0 @@ -package i94 - -import scala.language.higherKinds - -trait Base { - type Rep[T] -} - -trait BaseExp extends Base { - type Rep[T] = Exp[T] - case class Exp[T](v: T) -} - -trait BaseStr extends Base { - type Rep[T] = String -} - -trait BaseDirect extends Base { - type Rep[T] = T -} - -trait Test1 { - trait Monad[X] { - def x: X - } - sealed abstract class Either[A,B] - case class Left[A,B](x: A) extends Either[A,B] with Monad[A] - case class Right[A,B](x: B) extends Either[A,B] with Monad[B] - def flatMap[X,Y,M[X]<:Monad[X]](m: M[X], f: X => M[Y]): M[Y] = f(m.x) - println(flatMap(Left(1), {x: Int => Left(x)})) -} -trait Test2 { - trait Monad[X] { - def x: X - } - sealed abstract class Either[A,B] - case class Left[A,B](x: A) extends Either[A,B] with Monad[A] - case class Right[A,B](x: B) extends Either[A,B] with Monad[B] - def flatMap[X,Y,M[X]](m: M[X], f: X => M[Y]): M[Y] - println(flatMap(Left(1), {x: Int => Left(x)})) -} -trait Test3 { - def flatMap[X,Y,M[X]](m: M[X], f: X => M[Y]): M[Y] - println(flatMap(Some(1), {x: Int => Some(x)})) -} |