diff options
Diffstat (limited to 'tests/pos/partialApplications.scala')
-rw-r--r-- | tests/pos/partialApplications.scala | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/tests/pos/partialApplications.scala b/tests/pos/partialApplications.scala index c1df1dee2..285dc8661 100644 --- a/tests/pos/partialApplications.scala +++ b/tests/pos/partialApplications.scala @@ -8,6 +8,39 @@ object Test { val ys: StringlyHistogram[String] = xs - val zs: StringlyHistogram = xs + def e = xs + + val zs: StringlyHistogram[_] = e + + type IntMap[Y] = Map[Int, Y] + + val is = Map[Int, Boolean]() + + val js: IntMap[Boolean] = is + + val ks: IntMap[_] = is + + type RMap[X, Y] = Map[Y, X] + + val rs = Map[Int, Float]() + + val ss: RMap[Float, Int] = rs + +} + +object Test2 { + type Histogram = Map[_, Int] + + type StringlyHistogram = Histogram[_ >: String] // error + + val xs: Histogram[String] = Map[String, Int]() // error + + val ys: StringlyHistogram[String] = xs // error + + val zs: StringlyHistogram = xs // error + + val xs1 = xs + val ys1 = ys + val zs1 = zs } |