summaryrefslogtreecommitdiff
path: root/test/files
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/files
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/files')
-rwxr-xr-xtest/files/pos/manifest1.scala20
1 files changed, 20 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)
+
+}