diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-12 17:12:59 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-12 18:14:04 +0200 |
commit | 84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb (patch) | |
tree | 0cb537aeafff402970ce51c0790cd9ba4e8de846 /tests/pos/i94-nada.scala | |
parent | cdebd91712b36b048233d7cf9501cc7a5bb50b31 (diff) | |
download | dotty-84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb.tar.gz dotty-84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb.tar.bz2 dotty-84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb.zip |
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.
Diffstat (limited to 'tests/pos/i94-nada.scala')
-rw-r--r-- | tests/pos/i94-nada.scala | 2 |
1 files changed, 1 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] |