summaryrefslogtreecommitdiff
path: root/test/files/pos/t0227.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-11-19 16:22:20 +0000
committerMartin Odersky <odersky@gmail.com>2007-11-19 16:22:20 +0000
commit1c3653233e48b93a32efacf00517a6738e0969bc (patch)
treeb09c44a8845250611a7da0b01deff072c7147df6 /test/files/pos/t0227.scala
parent44b2aab80481f9884dcbd61ae88c189967401ff5 (diff)
downloadscala-1c3653233e48b93a32efacf00517a6738e0969bc.tar.gz
scala-1c3653233e48b93a32efacf00517a6738e0969bc.tar.bz2
scala-1c3653233e48b93a32efacf00517a6738e0969bc.zip
fixed #226 and #227
Diffstat (limited to 'test/files/pos/t0227.scala')
-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
+}