summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-05-30 07:36:31 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-05-30 07:36:31 +0000
commit390ccacfe0caa4c07af6193dec3e172c0fcd7896 (patch)
tree001ff4a00bd9d8cab651d9bf245bfc795748d829 /test/files/pos
parent661f1ba10e5062fd987c4cafe43ad1f0dc3f5491 (diff)
downloadscala-390ccacfe0caa4c07af6193dec3e172c0fcd7896.tar.gz
scala-390ccacfe0caa4c07af6193dec3e172c0fcd7896.tar.bz2
scala-390ccacfe0caa4c07af6193dec3e172c0fcd7896.zip
Named and default arguments
- MethodTypes now have (params: List[Symbol]) - "copy"-methods for case classes - the "copy" object in the compiler is now called "treeCopy"
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t1659.check5
-rw-r--r--test/files/pos/t1659.scala4
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/t1659.check b/test/files/pos/t1659.check
new file mode 100644
index 0000000000..b75da8798b
--- /dev/null
+++ b/test/files/pos/t1659.check
@@ -0,0 +1,5 @@
+t1659.scala:3: error: overriding method u in trait W of type [A](v: Y{type X = A})Unit;
+ method u has incompatible type
+class Z extends W { def u[A](v : Y { type X = A }) = null }
+ ^
+one error found
diff --git a/test/files/pos/t1659.scala b/test/files/pos/t1659.scala
new file mode 100644
index 0000000000..10470d66f8
--- /dev/null
+++ b/test/files/pos/t1659.scala
@@ -0,0 +1,4 @@
+trait Y { type X }
+trait W { def u[A](v : Y { type X = A }) : Unit }
+class Z extends W { def u[A](v : Y { type X = A }) = null }
+