summaryrefslogtreecommitdiff
path: root/test/files/neg/t2416.scala
blob: 6bb57a984b23553ac7d183504e760283fd44b885 (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!
}