blob: a039625254eb5a67b9a852b601087d7221297f53 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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
}
|