aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/t2416.scala
blob: 6fd2ca229492131cc6f1e74506db6c0dc983b04f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
object t2416a {
  trait A[X <: Double] { type B = X }
  def x : A[Int]#B = 10 // no you won't
}

object t2416b {
  trait A{type B[Y <: Double] = Int}
  def x : A#B[Boolean] = 10 // seriously?
}

object t2416c {
  trait A{type B[Z <: Double] = Int}
  type C[Z <: A] = Z#B[String] // nuh-uh!
}