aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/templateParents.scala
blob: 530f8c1489189d676aae50f97a6b363ebae1a892 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
object templateParents {

// traits do not call a constructor
  class C[+T](x: T)
  trait D extends C[String]
  trait E extends C[Int]
  new C("abc") with D

  //val x = new D with E

  //val y: C = x
}