aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/partialApplications.scala
blob: d186273aa2e38ec252ada20c192fca448572f066 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                                                         
object Test2 {
  type Histogram = Map[_, Int]  // this is now an existential type!

  type StringlyHistogram = Histogram[_ >: String] // Error: Test2.Histogram does not take type parameters

  val xs: Histogram[String] = Map[String, Int]() // Error: Test2.Histogram does not take type parameters

  val ys: StringlyHistogram[String] = xs // Error: Test2.StringlyHistogram does not take type parameters

  val zs: StringlyHistogram = xs

  val xs1 = xs
  val ys1 = ys
  val zs1 = zs

}