summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/files/pos/t0227.scala31
1 files changed, 31 insertions, 0 deletions
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
+}