blob: 10cbc556ea791be85bea8fbcbe82a1484d762da3 (
plain) (
blame)
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
}
|