aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t0227.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t0227.scala')
-rw-r--r--tests/untried/pos/t0227.scala31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/untried/pos/t0227.scala b/tests/untried/pos/t0227.scala
new file mode 100644
index 000000000..806b20d40
--- /dev/null
+++ b/tests/untried/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 = 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
+}