summaryrefslogtreecommitdiff
path: root/test/files/pos/t6575b.scala
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-11-01 10:44:30 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-11-01 10:44:30 -0400
commit79087c79c402ababbb50fa9d1e4e78b0e52189c6 (patch)
tree210f4f0024bffd9a0061285a948079c518342983 /test/files/pos/t6575b.scala
parent557fe9e9d2c14f363918e89056233a981dc5ef5c (diff)
parent17497cbc95d2e3cfe52eb2a1ece0d414e9308660 (diff)
downloadscala-79087c79c402ababbb50fa9d1e4e78b0e52189c6.tar.gz
scala-79087c79c402ababbb50fa9d1e4e78b0e52189c6.tar.bz2
scala-79087c79c402ababbb50fa9d1e4e78b0e52189c6.zip
Merge branch '2.10.0-wip' of github.com:scala/scala into 2.10.0-wip
Diffstat (limited to 'test/files/pos/t6575b.scala')
-rw-r--r--test/files/pos/t6575b.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/pos/t6575b.scala b/test/files/pos/t6575b.scala
new file mode 100644
index 0000000000..d3e58b2a16
--- /dev/null
+++ b/test/files/pos/t6575b.scala
@@ -0,0 +1,17 @@
+// inferred types were okay here as Function nodes aren't
+// translated into anoymous subclasses of AbstractFunctionN
+// until after the typer.
+//
+// So this test is just confirmation.
+trait X { def foo: Function1[Int, Int] }
+
+trait Y extends X {
+ abstract override def foo = { case i => super.foo(i) * 2 }
+}
+trait Z extends X {
+ abstract override def foo = { case i => super.foo(i) + 3 }
+}
+
+trait Comb extends Y with Z {
+ abstract override def foo: Function1[Int, Int] = { case i => super.foo(i) - 2 }
+}