aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/templateParents.scala
blob: a039625254eb5a67b9a852b601087d7221297f53 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                         





                                                                    
 
object templateParentsNeg {

  class C(x: String)
  class C2
  trait D extends C("a") // error: traits may not call class constructors

  new C("b") with C2     // error: C2 is not a trait

}
object templateParentsNeg1 {
  class C[T]
  trait D extends C[String]
  trait E extends C[Int]

  val x = new D with E // error no type fits between inferred bounds
}