aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/partialApplications.scala
blob: 10cbc556ea791be85bea8fbcbe82a1484d762da3 (plain) (tree)
1
2
3
4
5
6
7
8


                                                                   
                                                                                                         
 
                                                                                                        
 
                                                                                                        







                                
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

}