summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2008-03-10 12:00:03 +0000
committerMartin Odersky <odersky@gmail.com>2008-03-10 12:00:03 +0000
commit83d3f475da9ab4db3bb35613639e55008b39b495 (patch)
tree9af5d7b4b8d8ffc79344599026a988caf7becaef /test
parent82953600481e3fa2238b897adb20d3fa7503c108 (diff)
downloadscala-83d3f475da9ab4db3bb35613639e55008b39b495.tar.gz
scala-83d3f475da9ab4db3bb35613639e55008b39b495.tar.bz2
scala-83d3f475da9ab4db3bb35613639e55008b39b495.zip
1.
2. Added * operator to RichString 3. changed zip in Array to accept arrays of different length 4. changed takeWhile/dropWhile in Array to yield Projections 5. Added Manifest types
Diffstat (limited to 'test')
-rwxr-xr-xtest/files/pos/manifest1.scala20
-rw-r--r--test/pending/neg/t0513.scala6
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/pos/manifest1.scala b/test/files/pos/manifest1.scala
new file mode 100755
index 0000000000..4d3b3bfa48
--- /dev/null
+++ b/test/files/pos/manifest1.scala
@@ -0,0 +1,20 @@
+import scala.reflect.Manifest
+
+object Test {
+ def foo[T](x: T)(implicit m: Manifest[T]) {
+ foo(List(x))
+ }
+ foo(1)
+ foo("abc")
+ foo(List(1, 2, 3))
+ val x: List[Int] with Ordered[List[Int]] = null
+ foo(x)
+ foo[x.type](x)
+ abstract class C { type T = String; val x: T }
+ val c = new C { val x = "abc" }
+ foo(c.x)
+ abstract class D { type T; val x: T }
+ val d: D = new D { type T = String; val x = "x" }
+ foo(d.x)
+
+}
diff --git a/test/pending/neg/t0513.scala b/test/pending/neg/t0513.scala
new file mode 100644
index 0000000000..0082b0e563
--- /dev/null
+++ b/test/pending/neg/t0513.scala
@@ -0,0 +1,6 @@
+object Test {
+ case class Y[T1, T2 <: T1]
+ //val test = Y[Nothing, Int] // Compiler error
+ case class Test[T]
+ val test2 = Test[Y[Nothing, Int]] // No error
+}