aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t0227.scala
blob: 806b20d4095ca029a9c4702928659d1c828f20e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
final class Settings {
    def f[T](a_args: T*): List[T] = Nil
}

abstract class Factory {
    type libraryType <: Base

    final def apply(settings: Settings): libraryType = sys.error("bla")
}

abstract class Base {
    val settings: Settings

    protected val demands: List[Factory] = Nil
}

class SA(val settings: Settings) extends Base {
    override val demands =  List(
            SD
        ) :::  settings.f(
            SC
        )
}

object SC extends Factory {
    type libraryType = Base
}

object SD extends Factory {
    type libraryType = SA
}