diff options
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/i94-nada.scala | 2 | ||||
-rw-r--r-- | tests/pos/t2712-6.scala | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/tests/pos/i94-nada.scala b/tests/pos/i94-nada.scala index 1c7d88a10..2c3cf895c 100644 --- a/tests/pos/i94-nada.scala +++ b/tests/pos/i94-nada.scala @@ -35,7 +35,7 @@ trait Test2 { 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(Right(1), {x: Int => Right(x)})) + 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] diff --git a/tests/pos/t2712-6.scala b/tests/pos/t2712-6.scala new file mode 100644 index 000000000..dbba60472 --- /dev/null +++ b/tests/pos/t2712-6.scala @@ -0,0 +1,12 @@ +package test + +object Tags { + type Tagged[A, T] = {type Tag = T; type Self = A} + + type @@[T, Tag] = Tagged[T, Tag] + + trait Disjunction + + def meh[M[_], A](ma: M[A]): M[A] = ma + meh(null: Int @@ Disjunction)//.asInstanceOf[Int @@ Disjunction]) +} |