summaryrefslogblamecommitdiff
path: root/test/files/neg/bug1275.scala
blob: 769156fff298142028170f4a67def7f72d29c624 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                  
object Test {
  trait Seq[+t] {
    type MyType[+t] <: Seq[t]
    def f: MyType[t]
  }

  def span[a, s <: Seq[a] { type MyType <: s } ](xs: s): s
    = xs f // xs: s <: Seq[a]{type MyType <: s }
    // xs.f : xs.MyType[a] <: Seq[a]
    // ill-formed type in bound for s: Seq[a] { type MyType <: s }
    // refinements aren't checked -- should they?
}