summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-11-13 13:14:15 +0000
committerMartin Odersky <odersky@gmail.com>2007-11-13 13:14:15 +0000
commit969384da702f2168bfe75d83870fe1b11b12c0c4 (patch)
tree895b50014d14f536337b9ccdb93927e87f2c4d40 /test/files
parent6ff4542f8bfde47588e5b641f39471756662bc08 (diff)
downloadscala-969384da702f2168bfe75d83870fe1b11b12c0c4.tar.gz
scala-969384da702f2168bfe75d83870fe1b11b12c0c4.tar.bz2
scala-969384da702f2168bfe75d83870fe1b11b12c0c4.zip
fixed #234; added tests
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t0204.check4
-rwxr-xr-xtest/files/neg/t0204.scala5
-rw-r--r--test/files/neg/t0207.check7
-rwxr-xr-xtest/files/neg/t0207.scala4
-rwxr-xr-xtest/files/pos/t0165.scala14
5 files changed, 34 insertions, 0 deletions
diff --git a/test/files/neg/t0204.check b/test/files/neg/t0204.check
new file mode 100644
index 0000000000..5af6d146d5
--- /dev/null
+++ b/test/files/neg/t0204.check
@@ -0,0 +1,4 @@
+t0204.scala:4: error: class type required
+ trait C extends B
+ ^
+one error found
diff --git a/test/files/neg/t0204.scala b/test/files/neg/t0204.scala
new file mode 100755
index 0000000000..0de9d9d16d
--- /dev/null
+++ b/test/files/neg/t0204.scala
@@ -0,0 +1,5 @@
+object Program {
+ trait A { type T }
+ type B = A { type T = String }
+ trait C extends B
+}
diff --git a/test/files/neg/t0207.check b/test/files/neg/t0207.check
new file mode 100644
index 0000000000..b1d8d42ffb
--- /dev/null
+++ b/test/files/neg/t0207.check
@@ -0,0 +1,7 @@
+t0207.scala:3: error: type T takes type parameters
+ type S = (T with T)[A]
+ ^
+t0207.scala:3: error: type T takes type parameters
+ type S = (T with T)[A]
+ ^
+two errors found
diff --git a/test/files/neg/t0207.scala b/test/files/neg/t0207.scala
new file mode 100755
index 0000000000..d9df0ca951
--- /dev/null
+++ b/test/files/neg/t0207.scala
@@ -0,0 +1,4 @@
+trait A {
+ type T[_]
+ type S = (T with T)[A]
+}
diff --git a/test/files/pos/t0165.scala b/test/files/pos/t0165.scala
new file mode 100755
index 0000000000..05c4a1c77a
--- /dev/null
+++ b/test/files/pos/t0165.scala
@@ -0,0 +1,14 @@
+package test3
+import scala.collection.jcl.LinkedHashMap
+
+trait Main {
+ def asMany : ArrayResult = {
+ object result extends LinkedHashMap[String,String] with ArrayResult {
+ def current = result
+ }
+ result
+ }
+ trait ArrayResult {
+ def current : scala.collection.Map[String,String]
+ }
+}