summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/contextbounds-implicits-new.scala (renamed from test/files/pos/contextbounds-implicits.scala)2
-rw-r--r--test/files/pos/implicits-new.scala (renamed from test/files/pos/implicits.scala)36
-rw-r--r--test/files/pos/manifest1-new.scala (renamed from test/files/pos/manifest1.scala)8
-rw-r--r--test/files/pos/nothing_manifest_disambig-new.scala10
-rw-r--r--test/files/pos/nothing_manifest_disambig.scala10
-rw-r--r--test/files/pos/spec-constr-new.scala (renamed from test/files/pos/spec-constr.scala)2
-rw-r--r--test/files/pos/spec-doubledef-new.scala (renamed from test/files/pos/spec-doubledef.scala)2
-rw-r--r--test/files/pos/spec-fields-new.scala (renamed from test/files/pos/spec-fields.scala)2
-rw-r--r--test/files/pos/spec-params-new.scala (renamed from test/files/pos/spec-params.scala)8
-rw-r--r--test/files/pos/spec-sparsearray-new.scala (renamed from test/files/pos/spec-sparsearray.scala)2
-rw-r--r--test/files/pos/t1381-new.scala (renamed from test/files/pos/t1381.scala)2
-rw-r--r--test/files/pos/t2795-new.scala (renamed from test/files/pos/t2795.scala)2
-rw-r--r--[-rwxr-xr-x]test/files/pos/t3363-new.scala (renamed from test/files/pos/t3363.scala)14
-rw-r--r--test/files/pos/t3498-new.scala (renamed from test/files/pos/t3498.scala)2
14 files changed, 51 insertions, 51 deletions
diff --git a/test/files/pos/contextbounds-implicits.scala b/test/files/pos/contextbounds-implicits-new.scala
index f9113ee320..71b3cca36f 100644
--- a/test/files/pos/contextbounds-implicits.scala
+++ b/test/files/pos/contextbounds-implicits-new.scala
@@ -3,6 +3,6 @@
*/
class C {
- def f[T: Manifest, S: Manifest](x: T, y: S)(implicit p: C) { }
+ def f[T: TypeTag, S: TypeTag](x: T, y: S)(implicit p: C) { }
}
diff --git a/test/files/pos/implicits.scala b/test/files/pos/implicits-new.scala
index 2c01dd0ba8..7eb7e100c3 100644
--- a/test/files/pos/implicits.scala
+++ b/test/files/pos/implicits-new.scala
@@ -45,7 +45,7 @@ object Test1625 {
implicit def byName[A](x: =>A) = new Wrapped(x)
implicit def byVal[A](x: A) = x
-
+
def main(args: Array[String]) = {
// val res:Wrapped = 7 // works
@@ -57,7 +57,7 @@ object Test1625 {
}
object Test2188 {
- implicit def toJavaList[A: ClassManifest](t:collection.Seq[A]):java.util.List[A] = java.util.Arrays.asList(t.toArray:_*)
+ implicit def toJavaList[A: ArrayTag](t:collection.Seq[A]):java.util.List[A] = java.util.Arrays.asList(t.toArray:_*)
val x: java.util.List[String] = List("foo")
}
@@ -67,23 +67,23 @@ object TestNumericWidening {
val x: java.lang.Long = y
}
-// #2709
-package foo2709 {
- class A
- class B
-
- package object bar {
- implicit def a2b(a: A): B = new B
- }
-
- package bar {
- object test {
- new A: B
- }
- }
-}
+// #2709
+package foo2709 {
+ class A
+ class B
+
+ package object bar {
+ implicit def a2b(a: A): B = new B
+ }
+
+ package bar {
+ object test {
+ new A: B
+ }
+ }
+}
// Problem with specs
object specsProblem {
- println(implicitly[Manifest[Class[_]]])
+ println(implicitly[ConcreteTypeTag[Class[_]]])
}
diff --git a/test/files/pos/manifest1.scala b/test/files/pos/manifest1-new.scala
index 8901aa7437..645bd42665 100644
--- a/test/files/pos/manifest1.scala
+++ b/test/files/pos/manifest1-new.scala
@@ -1,7 +1,7 @@
-import scala.reflect.Manifest
+import scala.reflect.TypeTag
object Test {
- def foo[T](x: T)(implicit m: Manifest[T]) {
+ def foo[T](x: T)(implicit m: TypeTag[T]) {
foo(List(x))
}
foo(1)
@@ -13,8 +13,8 @@ object Test {
abstract class C { type T = String; val x: T }
val c = new C { val x = "abc" }
foo(c.x)
- abstract class D { type T; implicit val m: Manifest[T]; val x: T }
- val stringm = implicitly[Manifest[String]]
+ abstract class D { type T; implicit val m: TypeTag[T]; val x: T }
+ val stringm = implicitly[TypeTag[String]]
val d: D = new D { type T = String; val m = stringm; val x = "x" }
import d.m
foo(d.x)
diff --git a/test/files/pos/nothing_manifest_disambig-new.scala b/test/files/pos/nothing_manifest_disambig-new.scala
new file mode 100644
index 0000000000..a60b0fdbf8
--- /dev/null
+++ b/test/files/pos/nothing_manifest_disambig-new.scala
@@ -0,0 +1,10 @@
+object Test {
+ def mani[T: TypeTag](xs: T) = xs
+ mani(List())
+
+ def listElMani[T: TypeTag](xs: List[T]) = xs
+ listElMani(List())
+
+ def foo[A, C](m : C)(implicit ev: C <:< Traversable[A], mani: TypeTag[A]): (C, A, TypeTag[A]) = (m, m.head, mani)
+ foo(List(1,2,3))
+} \ No newline at end of file
diff --git a/test/files/pos/nothing_manifest_disambig.scala b/test/files/pos/nothing_manifest_disambig.scala
deleted file mode 100644
index 076742033f..0000000000
--- a/test/files/pos/nothing_manifest_disambig.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-object Test {
- def mani[T: Manifest](xs: T) = xs
- mani(List())
-
- def listElMani[T: Manifest](xs: List[T]) = xs
- listElMani(List())
-
- def foo[A, C](m : C)(implicit ev: C <:< Traversable[A], mani: Manifest[A]): (C, A, Manifest[A]) = (m, m.head, mani)
- foo(List(1,2,3))
-} \ No newline at end of file
diff --git a/test/files/pos/spec-constr.scala b/test/files/pos/spec-constr-new.scala
index e908b65a41..7cd02b0680 100644
--- a/test/files/pos/spec-constr.scala
+++ b/test/files/pos/spec-constr-new.scala
@@ -1,4 +1,4 @@
-class SparseArray2[@specialized(Int) T:ClassManifest](val maxSize: Int, initialLength:Int = 3) {
+class SparseArray2[@specialized(Int) T:ArrayTag](val maxSize: Int, initialLength:Int = 3) {
private var data = new Array[T](initialLength);
private var index = new Array[Int](initialLength);
diff --git a/test/files/pos/spec-doubledef.scala b/test/files/pos/spec-doubledef-new.scala
index 86b0d857d3..33f1e82b6e 100644
--- a/test/files/pos/spec-doubledef.scala
+++ b/test/files/pos/spec-doubledef-new.scala
@@ -13,7 +13,7 @@ class C extends A[Int] {
override def getWith[@specialized(Int) Z](f: Int => Z) = f(value)
}
-abstract class B[T, @specialized(scala.Int) U : Manifest, @specialized(scala.Int) V <% Ordered[V]] {
+abstract class B[T, @specialized(scala.Int) U : TypeTag, @specialized(scala.Int) V <% Ordered[V]] {
val u: U
val v: V
diff --git a/test/files/pos/spec-fields.scala b/test/files/pos/spec-fields-new.scala
index 26a8c4ffbd..ddd8bd6624 100644
--- a/test/files/pos/spec-fields.scala
+++ b/test/files/pos/spec-fields-new.scala
@@ -1,4 +1,4 @@
-abstract class Foo[@specialized T: ClassManifest, U <: Ordered[U]](x: T, size: Int) {
+abstract class Foo[@specialized T: ArrayTag, U <: Ordered[U]](x: T, size: Int) {
var y: T
var z: T = x
diff --git a/test/files/pos/spec-params.scala b/test/files/pos/spec-params-new.scala
index f522512846..5fe0c82d40 100644
--- a/test/files/pos/spec-params.scala
+++ b/test/files/pos/spec-params-new.scala
@@ -1,4 +1,4 @@
-class Foo[@specialized A: ClassManifest] {
+class Foo[@specialized A: ArrayTag] {
// conflicting in bounds, expect a normalized member calling m
// and bridge + implementation in specialized subclasses
@@ -10,7 +10,7 @@ class Foo[@specialized A: ClassManifest] {
def m2[@specialized B <: String](x: B) = x.concat("a")
// conflicting in bounds, no mention of other spec members
- // expect an overload here plus implementation in
+ // expect an overload here plus implementation in
// compatible specialized subclasses
def m3[@specialized B >: A](x: B) = ()
@@ -19,10 +19,10 @@ class Foo[@specialized A: ClassManifest] {
// non-conflicting, expect a normalized overload implementation here
def m5[@specialized B](x: B) = x
-
+
// non-conflicting, expect a normalized implementation here
// and specialized implementations for all expansions in specialized subclasses
- def m6[@specialized B](x: B, y: A) =
+ def m6[@specialized B](x: B, y: A) =
goal(y)
def goal(x: A) = {
diff --git a/test/files/pos/spec-sparsearray.scala b/test/files/pos/spec-sparsearray-new.scala
index ea7710a785..0659bf7926 100644
--- a/test/files/pos/spec-sparsearray.scala
+++ b/test/files/pos/spec-sparsearray-new.scala
@@ -1,6 +1,6 @@
import scala.collection.mutable.MapLike
-class SparseArray[@specialized(Int) T:ClassManifest] extends collection.mutable.Map[Int,T] with collection.mutable.MapLike[Int,T,SparseArray[T]] {
+class SparseArray[@specialized(Int) T:ArrayTag] extends collection.mutable.Map[Int,T] with collection.mutable.MapLike[Int,T,SparseArray[T]] {
override def get(x: Int) = {
val ind = findOffset(x)
if(ind < 0) None else Some(error("ignore"))
diff --git a/test/files/pos/t1381.scala b/test/files/pos/t1381-new.scala
index 0762891898..8781ef4fdb 100644
--- a/test/files/pos/t1381.scala
+++ b/test/files/pos/t1381-new.scala
@@ -1,4 +1,4 @@
-import scala.reflect.Manifest
+import scala.reflect.TypeTag
class D[V <: Variable]
diff --git a/test/files/pos/t2795.scala b/test/files/pos/t2795-new.scala
index 935cb1f444..af9c4e8b1c 100644
--- a/test/files/pos/t2795.scala
+++ b/test/files/pos/t2795-new.scala
@@ -5,7 +5,7 @@ trait Element[T] {
trait Config {
type T <: Element[T]
- implicit val m: ClassManifest[T]
+ implicit val m: ArrayTag[T]
// XXX Following works fine:
// type T <: Element[_]
}
diff --git a/test/files/pos/t3363.scala b/test/files/pos/t3363-new.scala
index bae54084ea..270462745c 100755..100644
--- a/test/files/pos/t3363.scala
+++ b/test/files/pos/t3363-new.scala
@@ -7,12 +7,12 @@ object TestCase {
//if you inherit from MapOps[T] instead of MapOps[F] then code compiles fine
implicit def map2ops[T,F](fs: Map[T,F]) = new MapOps[F] {
//if you remove this line, then code compiles
- lazy val m: Manifest[T] = error("just something to make it compile")
- def is(xs: List[T]) = List(xs)
- }
+ lazy val m: TypeTag[T] = error("just something to make it compile")
+ def is(xs: List[T]) = List(xs)
+ }
- def main(args: Array[String]) {
- println(Map(1 -> "2") is List(2))
- }
+ def main(args: Array[String]) {
+ println(Map(1 -> "2") is List(2))
+ }
- }
+ }
diff --git a/test/files/pos/t3498.scala b/test/files/pos/t3498-new.scala
index bcc90ca64c..653c50042a 100644
--- a/test/files/pos/t3498.scala
+++ b/test/files/pos/t3498-new.scala
@@ -1,4 +1,4 @@
-abstract class A[T, @specialized(scala.Int) U : Manifest] {
+abstract class A[T, @specialized(scala.Int) U : ArrayTag] {
def f(state: T): Array[U]
}