summaryrefslogtreecommitdiff
path: root/test/files/pos/t6575b.scala
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-10-31 10:59:03 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-10-31 10:59:03 -0700
commit290220bc6f5e1a11e38c67eb3e51ec617f96a1f6 (patch)
treef2ec688d5b9dedaf4b93121d70401e629867ed18 /test/files/pos/t6575b.scala
parent1f9124b74566efe82e1c4f8d33fcd8618ea0f599 (diff)
parent8aec78470637f42f50981f8034215a709602dbad (diff)
downloadscala-290220bc6f5e1a11e38c67eb3e51ec617f96a1f6.tar.gz
scala-290220bc6f5e1a11e38c67eb3e51ec617f96a1f6.tar.bz2
scala-290220bc6f5e1a11e38c67eb3e51ec617f96a1f6.zip
Merge pull request #1546 from paulp/merge-2.10.0-wip
Merge 2.10.0-wip into 2.10.x.
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 }
+}