summaryrefslogtreecommitdiff
path: root/test/files/pos/t6161b.scala
blob: 5783cc85f2a7073fcbfb3ed78adb15b51dc12323 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
object t6161 {
  trait N {
    type Name
  }

  trait N1 extends N {
    class Name {
      type ThisNameType <: Name
      def encode: ThisNameType = ???
    }
  }

  trait S {
    self: N => // change to N1 and it compiles
    type NameType <: Name
  }

  object g extends S with N1

  val n1: g.NameType = ???
  val n2: g.Name = n1.encode
}