summaryrefslogblamecommitdiff
path: root/test/files/pos/t0227.scala
blob: 806b20d4095ca029a9c4702928659d1c828f20e2 (plain) (tree)
1
2
3
4
5
6
7
8






                                       
                                                                       












                                               
         








                           
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
}