summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-06-04 13:53:13 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-06-08 15:32:17 +0200
commit7b0f0a142bb526f4bd108a8c208ec9a8952398c9 (patch)
treeee13d036756be41521a9eb3f1e05898410ab744e /test/files/pos
parentd9103e01b467634d61baa3b131aeb93fca9e20a5 (diff)
downloadscala-7b0f0a142bb526f4bd108a8c208ec9a8952398c9.tar.gz
scala-7b0f0a142bb526f4bd108a8c208ec9a8952398c9.tar.bz2
scala-7b0f0a142bb526f4bd108a8c208ec9a8952398c9.zip
repairs the tests after the refactoring spree
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/contextbounds-implicits-new.scala4
-rw-r--r--test/files/pos/implicits-new.scala5
-rw-r--r--test/files/pos/liftcode_polymorphic.scala25
-rw-r--r--test/files/pos/manifest1-new.scala4
-rw-r--r--test/files/pos/nothing_manifest_disambig-new.scala2
-rw-r--r--test/files/pos/spec-constr-new.scala4
-rw-r--r--test/files/pos/spec-doubledef-new.scala4
-rw-r--r--test/files/pos/spec-fields-new.scala4
-rw-r--r--test/files/pos/spec-params-new.scala4
-rw-r--r--test/files/pos/spec-sparsearray-new.scala3
-rw-r--r--test/files/pos/t1381-new.scala4
-rw-r--r--test/files/pos/t2795-new.scala4
-rw-r--r--test/files/pos/t3363-new.scala4
-rw-r--r--test/files/pos/t3498-new.scala2
-rw-r--r--test/files/pos/t5223.scala4
-rw-r--r--test/files/pos/t5305.scala2
-rw-r--r--test/files/pos/t531.scala4
-rw-r--r--test/files/pos/t532.scala4
-rw-r--r--test/files/pos/t5769.scala1
-rw-r--r--test/files/pos/t5809.scala11
-rw-r--r--test/files/pos/typetags.scala12
21 files changed, 70 insertions, 41 deletions
diff --git a/test/files/pos/contextbounds-implicits-new.scala b/test/files/pos/contextbounds-implicits-new.scala
index 71b3cca36f..327c4a98dc 100644
--- a/test/files/pos/contextbounds-implicits-new.scala
+++ b/test/files/pos/contextbounds-implicits-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
/* Tests implicit parameters in the presence of context bounds.
* See Section 7.4 of the Scala Language Specification.
*/
@@ -5,4 +7,4 @@ class C {
def f[T: TypeTag, S: TypeTag](x: T, y: S)(implicit p: C) { }
-}
+} \ No newline at end of file
diff --git a/test/files/pos/implicits-new.scala b/test/files/pos/implicits-new.scala
index 7eb7e100c3..0afbda1c3c 100644
--- a/test/files/pos/implicits-new.scala
+++ b/test/files/pos/implicits-new.scala
@@ -1,3 +1,6 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.{ArrayTag, arrayTag}
+
// #1435
object t1435 {
implicit def a(s:String):String = error("")
@@ -86,4 +89,4 @@ package foo2709 {
// Problem with specs
object specsProblem {
println(implicitly[ConcreteTypeTag[Class[_]]])
-}
+} \ No newline at end of file
diff --git a/test/files/pos/liftcode_polymorphic.scala b/test/files/pos/liftcode_polymorphic.scala
index 9c59b34bee..8f537d278a 100644
--- a/test/files/pos/liftcode_polymorphic.scala
+++ b/test/files/pos/liftcode_polymorphic.scala
@@ -1,13 +1,12 @@
-import scala.reflect.mirror._
-
-object Append extends Application {
-
- def append[A](l1: List[A], l2: List[A]):List[A] =
- l1 match {
- case Nil => l2
- case x::xs => x :: append(xs, l2)
- }
-
- println(reify(append _).tree)
-}
-
+import scala.reflect.runtime.universe._
+
+object Append extends Application {
+
+ def append[A](l1: List[A], l2: List[A]):List[A] =
+ l1 match {
+ case Nil => l2
+ case x::xs => x :: append(xs, l2)
+ }
+
+ println(reify(append _).tree)
+}
diff --git a/test/files/pos/manifest1-new.scala b/test/files/pos/manifest1-new.scala
index 645bd42665..3907d7854b 100644
--- a/test/files/pos/manifest1-new.scala
+++ b/test/files/pos/manifest1-new.scala
@@ -1,4 +1,4 @@
-import scala.reflect.TypeTag
+import scala.reflect.runtime.universe._
object Test {
def foo[T](x: T)(implicit m: TypeTag[T]) {
@@ -18,4 +18,4 @@ object Test {
val d: D = new D { type T = String; val m = stringm; val x = "x" }
import d.m
foo(d.x)
-}
+} \ No newline at end of file
diff --git a/test/files/pos/nothing_manifest_disambig-new.scala b/test/files/pos/nothing_manifest_disambig-new.scala
index a60b0fdbf8..ed3a9e8fb1 100644
--- a/test/files/pos/nothing_manifest_disambig-new.scala
+++ b/test/files/pos/nothing_manifest_disambig-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object Test {
def mani[T: TypeTag](xs: T) = xs
mani(List())
diff --git a/test/files/pos/spec-constr-new.scala b/test/files/pos/spec-constr-new.scala
index 7cd02b0680..a117e99fef 100644
--- a/test/files/pos/spec-constr-new.scala
+++ b/test/files/pos/spec-constr-new.scala
@@ -1,7 +1,9 @@
+import scala.reflect.{ArrayTag, arrayTag}
+
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);
// comment out to compile correctly
data.length + 3;
-}
+} \ No newline at end of file
diff --git a/test/files/pos/spec-doubledef-new.scala b/test/files/pos/spec-doubledef-new.scala
index 33f1e82b6e..ad9c6399a5 100644
--- a/test/files/pos/spec-doubledef-new.scala
+++ b/test/files/pos/spec-doubledef-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object Test {
def fn[@specialized T, @specialized U](t : T => Int, u : U => Int) : T =
null.asInstanceOf[T]
@@ -25,4 +27,4 @@ abstract class B[T, @specialized(scala.Int) U : TypeTag, @specialized(scala.Int)
Pair(u, v2)
}
}
-}
+} \ No newline at end of file
diff --git a/test/files/pos/spec-fields-new.scala b/test/files/pos/spec-fields-new.scala
index ddd8bd6624..54bbe27893 100644
--- a/test/files/pos/spec-fields-new.scala
+++ b/test/files/pos/spec-fields-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ArrayTag, arrayTag}
+
abstract class Foo[@specialized T: ArrayTag, U <: Ordered[U]](x: T, size: Int) {
var y: T
var z: T = x
@@ -7,4 +9,4 @@ abstract class Foo[@specialized T: ArrayTag, U <: Ordered[U]](x: T, size: Int) {
def getZ = z
def setZ(zz: T) = z = zz
-}
+} \ No newline at end of file
diff --git a/test/files/pos/spec-params-new.scala b/test/files/pos/spec-params-new.scala
index 5fe0c82d40..bf89f3920a 100644
--- a/test/files/pos/spec-params-new.scala
+++ b/test/files/pos/spec-params-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ArrayTag, arrayTag}
+
class Foo[@specialized A: ArrayTag] {
// conflicting in bounds, expect a normalized member calling m
@@ -29,4 +31,4 @@ class Foo[@specialized A: ArrayTag] {
val xs = new Array[A](1)
xs(0) = x
}
-}
+} \ No newline at end of file
diff --git a/test/files/pos/spec-sparsearray-new.scala b/test/files/pos/spec-sparsearray-new.scala
index 0659bf7926..99156d677b 100644
--- a/test/files/pos/spec-sparsearray-new.scala
+++ b/test/files/pos/spec-sparsearray-new.scala
@@ -1,3 +1,4 @@
+import scala.reflect.{ArrayTag, arrayTag}
import scala.collection.mutable.MapLike
class SparseArray[@specialized(Int) T:ArrayTag] extends collection.mutable.Map[Int,T] with collection.mutable.MapLike[Int,T,SparseArray[T]] {
@@ -21,4 +22,4 @@ class SparseArray[@specialized(Int) T:ArrayTag] extends collection.mutable.Map[I
def -=(ind: Int) = error("ignore")
def +=(kv: (Int,T)) = error("ignore")
override final def iterator = error("ignore")
-}
+} \ No newline at end of file
diff --git a/test/files/pos/t1381-new.scala b/test/files/pos/t1381-new.scala
index 8781ef4fdb..57e0f31fba 100644
--- a/test/files/pos/t1381-new.scala
+++ b/test/files/pos/t1381-new.scala
@@ -1,4 +1,4 @@
-import scala.reflect.TypeTag
+import scala.reflect.runtime.universe._
class D[V <: Variable]
@@ -28,4 +28,4 @@ abstract class EV[T](initval:T) extends PV[T](initval) with IV {
override def d : ID[VT] = null
// Comment this out to eliminate crash
protected var indx = d.index(initval)
-}
+} \ No newline at end of file
diff --git a/test/files/pos/t2795-new.scala b/test/files/pos/t2795-new.scala
index af9c4e8b1c..67c34ec263 100644
--- a/test/files/pos/t2795-new.scala
+++ b/test/files/pos/t2795-new.scala
@@ -1,5 +1,7 @@
package t1
+import scala.reflect.{ArrayTag, arrayTag}
+
trait Element[T] {
}
@@ -14,4 +16,4 @@ trait Transform { self: Config =>
def processBlock(block: Array[T]): Unit = {
var X = new Array[T](1)
}
-}
+} \ No newline at end of file
diff --git a/test/files/pos/t3363-new.scala b/test/files/pos/t3363-new.scala
index 270462745c..e609f4d55f 100644
--- a/test/files/pos/t3363-new.scala
+++ b/test/files/pos/t3363-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.runtime.universe._
+
object TestCase {
//now matter if you put (abstract) class or trait it will fail in all cases
@@ -15,4 +17,4 @@ object TestCase {
println(Map(1 -> "2") is List(2))
}
- }
+ } \ No newline at end of file
diff --git a/test/files/pos/t3498-new.scala b/test/files/pos/t3498-new.scala
index 653c50042a..7388e53e3e 100644
--- a/test/files/pos/t3498-new.scala
+++ b/test/files/pos/t3498-new.scala
@@ -1,3 +1,5 @@
+import scala.reflect.{ArrayTag, arrayTag}
+
abstract class A[T, @specialized(scala.Int) U : ArrayTag] {
def f(state: T): Array[U]
}
diff --git a/test/files/pos/t5223.scala b/test/files/pos/t5223.scala
index 398630dc61..0b2528e367 100644
--- a/test/files/pos/t5223.scala
+++ b/test/files/pos/t5223.scala
@@ -1,6 +1,6 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Foo extends App {
reify{def printf(format: String, args: Any*): String = null }
reify{def printf(format: String, args: Any*): String = ("abc": @cloneable)}
-}
+} \ No newline at end of file
diff --git a/test/files/pos/t5305.scala b/test/files/pos/t5305.scala
index 4c32cd7c6d..c0237ca3bd 100644
--- a/test/files/pos/t5305.scala
+++ b/test/files/pos/t5305.scala
@@ -7,7 +7,7 @@ object t5305 {
}
in {
- import O.{F, v}
+ import O.{F, v}
type x = {type l = (F, v.type)} // not found: type F
}
}
diff --git a/test/files/pos/t531.scala b/test/files/pos/t531.scala
index 5176912ef0..d53539f34f 100644
--- a/test/files/pos/t531.scala
+++ b/test/files/pos/t531.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
def titi = {
@@ -8,4 +8,4 @@ object Test extends App {
}}
()
}
-}
+} \ No newline at end of file
diff --git a/test/files/pos/t532.scala b/test/files/pos/t532.scala
index a319fdfa27..7c33637b5d 100644
--- a/test/files/pos/t532.scala
+++ b/test/files/pos/t532.scala
@@ -1,4 +1,4 @@
-import scala.reflect.mirror._
+import scala.reflect.runtime.universe._
object Test extends App {
def titi: Unit = {
@@ -8,4 +8,4 @@ object Test extends App {
}}
()
}
-}
+} \ No newline at end of file
diff --git a/test/files/pos/t5769.scala b/test/files/pos/t5769.scala
index 723d37bfee..523fe08a60 100644
--- a/test/files/pos/t5769.scala
+++ b/test/files/pos/t5769.scala
@@ -1,4 +1,5 @@
// a.scala
+import scala.reflect.{ArrayTag, arrayTag}
class A {
type AI = Array[Int]
diff --git a/test/files/pos/t5809.scala b/test/files/pos/t5809.scala
index 8f6ce708d2..133e13c4ed 100644
--- a/test/files/pos/t5809.scala
+++ b/test/files/pos/t5809.scala
@@ -1,10 +1,5 @@
-package scala.reflect
-
-package object api {
- implicit class PimpedExpr[T](expr: Universe # Expr[T]) {
- def runtimeEval: T = {
- println("hello, dear")
- expr.eval
- }
+package object foo {
+ implicit class PimpedInt(foo: Int) {
+ def bar = ???
}
} \ No newline at end of file
diff --git a/test/files/pos/typetags.scala b/test/files/pos/typetags.scala
new file mode 100644
index 0000000000..33390d7b89
--- /dev/null
+++ b/test/files/pos/typetags.scala
@@ -0,0 +1,12 @@
+import scala.reflect.{basis => rb}
+import scala.reflect.runtime.{universe => ru}
+
+object Test {
+ def main(args: Array[String]) {
+ def foo(implicit t: rb.TypeTag[List[Int]]) {
+ println(t)
+ val t2: ru.TypeTag[_] = t in ru.rootMirror
+ println(t2)
+ }
+ }
+}