summaryrefslogtreecommitdiff
path: root/test/files/neg/t1275.scala
blob: 1175b30763a41fa08d1fd9478c20a9b23657589c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
object Test {
  trait Seq[+t] {
    type MyType[+t] <: Seq[t]

    def f: MyType[t]
  }

  // illegal abstract type member refinement: changes the arity of MyType
  // the error is pretty strange, since the compiler forms the illegal type xs.MyType[a] anyway
  def span[a, s <: Seq[a] { type MyType/*look ma, no type parameters!*/ <: s } ](xs: s): s
     = xs f
//        ^
// found   : xs.MyType[a]
// required: s
}