From 1c3653233e48b93a32efacf00517a6738e0969bc Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 19 Nov 2007 16:22:20 +0000 Subject: fixed #226 and #227 --- test/files/pos/t0227.scala | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 test/files/pos/t0227.scala (limited to 'test/files/pos/t0227.scala') diff --git a/test/files/pos/t0227.scala b/test/files/pos/t0227.scala new file mode 100755 index 0000000000..a52a9798fc --- /dev/null +++ b/test/files/pos/t0227.scala @@ -0,0 +1,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 = 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 +} -- cgit v1.2.3