aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-12 17:12:59 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-12 18:14:04 +0200
commit84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb (patch)
tree0cb537aeafff402970ce51c0790cd9ba4e8de846 /tests/neg
parentcdebd91712b36b048233d7cf9501cc7a5bb50b31 (diff)
downloaddotty-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/neg')
-rw-r--r--tests/neg/boundspropagation.scala2
-rw-r--r--tests/neg/i94-nada.scala11
2 files changed, 1 insertions, 12 deletions
diff --git a/tests/neg/boundspropagation.scala b/tests/neg/boundspropagation.scala
index b545b09da..dd4ebf513 100644
--- a/tests/neg/boundspropagation.scala
+++ b/tests/neg/boundspropagation.scala
@@ -40,5 +40,5 @@ object test4 {
}
class Test5 {
-"": ({ type U = this.type })#U // error // error
+"": ({ type U = this.type })#U // error
}
diff --git a/tests/neg/i94-nada.scala b/tests/neg/i94-nada.scala
deleted file mode 100644
index 8ca104e06..000000000
--- a/tests/neg/i94-nada.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-trait Test1 {
- trait Monad[MX] {
- def x: MX
- }
- 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[FX,FY,M[FMX]<:Monad[FMX]](m: M[FX], f: FX => M[FY]): M[FY] = f(m.x)
- println(flatMap(Left(1), {x: Int => Left(x)})) // error: Left does not conform to [X] -> Monad[X]
-
-}