summaryrefslogtreecommitdiff
path: root/test/files/pos/t0904.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2008-05-21 17:32:29 +0000
committerMartin Odersky <odersky@gmail.com>2008-05-21 17:32:29 +0000
commit96b80791737efd952383aba56ba69440e861647d (patch)
tree6df772e7a2d73ef0f934a18733486e06447d96c9 /test/files/pos/t0904.scala
parentb7efa99768e14c03df810b129f979ba61aba8e87 (diff)
downloadscala-96b80791737efd952383aba56ba69440e861647d.tar.gz
scala-96b80791737efd952383aba56ba69440e861647d.tar.bz2
scala-96b80791737efd952383aba56ba69440e861647d.zip
added tests; fixed #903; made Predef.Map covari...
added tests; fixed #903; made Predef.Map covariant in second parameter.
Diffstat (limited to 'test/files/pos/t0904.scala')
-rw-r--r--test/files/pos/t0904.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/pos/t0904.scala b/test/files/pos/t0904.scala
new file mode 100644
index 0000000000..28ad30fc2d
--- /dev/null
+++ b/test/files/pos/t0904.scala
@@ -0,0 +1,17 @@
+trait A {
+ def apply(x: Int): Int
+ def update(x: Int, y: Int): Unit
+}
+
+trait B extends A
+
+abstract class Foo {
+ val a: A = null
+ val b: B = null
+
+ a(0) = 1
+ b(0) = 1
+
+ a(0) += 1
+ b(0) += 1 // this one does not type check.
+}