From 84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 12 Jul 2016 17:12:59 +0200 Subject: Avoid dealiasing on type application When applying a type alias of a type lambda, keep the original application instead of reducing. But reduce anyway if - the reduced type is an application where the type constructor has the same kind as the original type constructor, or - some of the arguments are wildcards. --- tests/pos/i94-nada.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/pos/i94-nada.scala') 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] -- cgit v1.2.3