summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t5892.check17
-rw-r--r--test/files/neg/t5892.scala25
-rw-r--r--test/files/pos/t5892.scala5
-rw-r--r--test/files/pos/t6028/t6028_1.scala3
-rw-r--r--test/files/pos/t6028/t6028_2.scala4
-rw-r--r--test/files/run/nullable-lazyvals.check3
-rw-r--r--test/files/run/nullable-lazyvals.scala36
-rw-r--r--test/files/run/reflect-resolveoverload-invalid.scala2
-rw-r--r--test/files/run/reflect-resolveoverload2.scala31
-rw-r--r--test/files/run/t5588.check2
-rw-r--r--test/files/run/t5588.scala14
-rw-r--r--test/files/run/t5937.scala12
-rw-r--r--test/files/run/t6028.check84
-rw-r--r--test/files/run/t6028.scala21
-rw-r--r--test/files/run/t6077_patmat_cse_irrefutable.check1
-rw-r--r--test/files/run/t6077_patmat_cse_irrefutable.scala13
-rw-r--r--test/files/run/t6089.check1
-rw-r--r--test/files/run/t6089.scala13
-rw-r--r--test/files/run/valueclasses-classmanifest-basic.check1
-rw-r--r--test/files/run/valueclasses-classmanifest-basic.scala5
-rw-r--r--test/files/run/valueclasses-classmanifest-existential.check1
-rw-r--r--test/files/run/valueclasses-classmanifest-existential.scala5
-rw-r--r--test/files/run/valueclasses-classmanifest-generic.check1
-rw-r--r--test/files/run/valueclasses-classmanifest-generic.scala5
-rw-r--r--test/files/run/valueclasses-classtag-basic.check1
-rw-r--r--test/files/run/valueclasses-classtag-basic.scala5
-rw-r--r--test/files/run/valueclasses-classtag-existential.check1
-rw-r--r--test/files/run/valueclasses-classtag-existential.scala5
-rw-r--r--test/files/run/valueclasses-classtag-generic.check1
-rw-r--r--test/files/run/valueclasses-classtag-generic.scala5
-rw-r--r--test/files/run/valueclasses-manifest-basic.check1
-rw-r--r--test/files/run/valueclasses-manifest-basic.scala5
-rw-r--r--test/files/run/valueclasses-manifest-existential.check1
-rw-r--r--test/files/run/valueclasses-manifest-existential.scala5
-rw-r--r--test/files/run/valueclasses-manifest-generic.check1
-rw-r--r--test/files/run/valueclasses-manifest-generic.scala5
-rw-r--r--test/files/run/valueclasses-typetag-basic.check1
-rw-r--r--test/files/run/valueclasses-typetag-basic.scala5
-rw-r--r--test/files/run/valueclasses-typetag-existential.check1
-rw-r--r--test/files/run/valueclasses-typetag-existential.scala5
-rw-r--r--test/files/run/valueclasses-typetag-generic.check1
-rw-r--r--test/files/run/valueclasses-typetag-generic.scala5
-rw-r--r--test/files/specialized/t6035.check1
-rw-r--r--test/files/specialized/t6035/first_1.scala5
-rw-r--r--test/files/specialized/t6035/second_2.scala13
-rw-r--r--test/pending/pos/t1751.cmds (renamed from test/files/pos/t1751.cmds)0
-rw-r--r--test/pending/pos/t1751/A1_2.scala (renamed from test/files/pos/t1751/A1_2.scala)0
-rw-r--r--test/pending/pos/t1751/A2_1.scala (renamed from test/files/pos/t1751/A2_1.scala)0
-rw-r--r--test/pending/pos/t1751/SuiteClasses.java (renamed from test/files/pos/t1751/SuiteClasses.java)0
-rw-r--r--test/pending/pos/t1782.cmds (renamed from test/files/pos/t1782.cmds)0
-rw-r--r--test/pending/pos/t1782/Ann.java (renamed from test/files/pos/t1782/Ann.java)0
-rw-r--r--test/pending/pos/t1782/Days.java (renamed from test/files/pos/t1782/Days.java)0
-rw-r--r--test/pending/pos/t1782/ImplementedBy.java (renamed from test/files/pos/t1782/ImplementedBy.java)0
-rw-r--r--test/pending/pos/t1782/Test_1.scala (renamed from test/files/pos/t1782/Test_1.scala)0
-rw-r--r--test/pending/pos/t294.cmds (renamed from test/files/pos/t294.cmds)0
-rw-r--r--test/pending/pos/t294/Ann.java (renamed from test/files/pos/t294/Ann.java)0
-rw-r--r--test/pending/pos/t294/Ann2.java (renamed from test/files/pos/t294/Ann2.java)0
-rw-r--r--test/pending/pos/t294/Test_1.scala (renamed from test/files/pos/t294/Test_1.scala)0
-rw-r--r--test/pending/pos/t294/Test_2.scala (renamed from test/files/pos/t294/Test_2.scala)0
-rw-r--r--test/pending/run/t3897.check (renamed from test/files/run/t3897.check)0
-rw-r--r--test/pending/run/t3897/J_2.java (renamed from test/files/run/t3897/J_2.java)0
-rw-r--r--test/pending/run/t3897/a_1.scala (renamed from test/files/run/t3897/a_1.scala)0
-rw-r--r--test/pending/run/t3897/a_2.scala (renamed from test/files/run/t3897/a_2.scala)0
-rw-r--r--test/pending/run/t5293-map.scala (renamed from test/files/run/t5293-map.scala)0
-rw-r--r--test/pending/run/t5293.scala (renamed from test/files/run/t5293.scala)0
-rw-r--r--test/pending/run/t5695.check2
-rw-r--r--test/pending/run/t5695/part_1.scala12
-rw-r--r--test/pending/run/t5695/part_2.scala8
68 files changed, 367 insertions, 33 deletions
diff --git a/test/files/neg/t5892.check b/test/files/neg/t5892.check
new file mode 100644
index 0000000000..839bf9de23
--- /dev/null
+++ b/test/files/neg/t5892.check
@@ -0,0 +1,17 @@
+t5892.scala:5: error: type mismatch;
+ found : Boolean(false)
+ required: String
+class C[@annot(false) X] {
+ ^
+t5892.scala:9: error: not found: value b2s
+class D[@annot(b2s(false)) X] {
+ ^
+t5892.scala:13: error: type mismatch;
+ found : Boolean(false)
+ required: String
+@annot(false) class E {
+ ^
+t5892.scala:17: error: not found: value b2s
+@annot(b2s(false)) class F {
+ ^
+four errors found
diff --git a/test/files/neg/t5892.scala b/test/files/neg/t5892.scala
new file mode 100644
index 0000000000..5e3b2f313e
--- /dev/null
+++ b/test/files/neg/t5892.scala
@@ -0,0 +1,25 @@
+import language.implicitConversions
+
+class annot(a: String) extends annotation.StaticAnnotation
+
+class C[@annot(false) X] {
+ implicit def b2s(b: Boolean): String = ""
+}
+
+class D[@annot(b2s(false)) X] {
+ implicit def b2s(b: Boolean): String = ""
+}
+
+@annot(false) class E {
+ implicit def b2s(b: Boolean): String = ""
+}
+
+@annot(b2s(false)) class F {
+ implicit def b2s(b: Boolean): String = ""
+}
+
+object T {
+ implicit def b2s(b: Boolean): String = ""
+ @annot(false) val x = 0
+ @annot(b2s(false)) val y = 0
+}
diff --git a/test/files/pos/t5892.scala b/test/files/pos/t5892.scala
new file mode 100644
index 0000000000..241e59860a
--- /dev/null
+++ b/test/files/pos/t5892.scala
@@ -0,0 +1,5 @@
+class foo(a: String) extends annotation.StaticAnnotation
+object o {
+ implicit def i2s(i: Int) = ""
+ @foo(1: String) def blerg { }
+}
diff --git a/test/files/pos/t6028/t6028_1.scala b/test/files/pos/t6028/t6028_1.scala
new file mode 100644
index 0000000000..6edb76069e
--- /dev/null
+++ b/test/files/pos/t6028/t6028_1.scala
@@ -0,0 +1,3 @@
+class C {
+ def foo(a: Int): Unit = () => a
+}
diff --git a/test/files/pos/t6028/t6028_2.scala b/test/files/pos/t6028/t6028_2.scala
new file mode 100644
index 0000000000..f44048c0ab
--- /dev/null
+++ b/test/files/pos/t6028/t6028_2.scala
@@ -0,0 +1,4 @@
+object Test {
+ // ensure that parameter names are untouched by lambdalift
+ new C().foo(a = 0)
+}
diff --git a/test/files/run/nullable-lazyvals.check b/test/files/run/nullable-lazyvals.check
new file mode 100644
index 0000000000..4db5783257
--- /dev/null
+++ b/test/files/run/nullable-lazyvals.check
@@ -0,0 +1,3 @@
+
+param1: null
+param2: null
diff --git a/test/files/run/nullable-lazyvals.scala b/test/files/run/nullable-lazyvals.scala
new file mode 100644
index 0000000000..c201e74e75
--- /dev/null
+++ b/test/files/run/nullable-lazyvals.scala
@@ -0,0 +1,36 @@
+
+/** Test that call-by-name parameters are set to null if
+ * they are used only to initialize a lazy value, after the
+ * value has been initialized.
+ */
+
+class Foo(param1: => Object, param2: => String) {
+ lazy val field1 = param1
+ lazy val field2 = try param2 finally println("")
+}
+
+object Test extends App {
+ val foo = new Foo(new Object, "abc")
+
+ foo.field1
+ foo.field2
+
+ for (f <- foo.getClass.getDeclaredFields) {
+ f.setAccessible(true)
+ if (f.getName.startsWith("param")) {
+ println("%s: %s".format(f.getName, f.get(foo)))
+ }
+ }
+
+ // test that try-finally does not generated a liftedTry
+ // helper. This would already fail the first part of the test,
+ // but this check will help diganose it (if the single access to a
+ // private field does not happen directly in the lazy val, it won't
+ // be nulled).
+ for (f <- foo.getClass.getDeclaredMethods) {
+ f.setAccessible(true)
+ if (f.getName.startsWith("lifted")) {
+ println("not expected: %s".format(f))
+ }
+ }
+}
diff --git a/test/files/run/reflect-resolveoverload-invalid.scala b/test/files/run/reflect-resolveoverload-invalid.scala
index def28ccbb4..8c5dc9f94b 100644
--- a/test/files/run/reflect-resolveoverload-invalid.scala
+++ b/test/files/run/reflect-resolveoverload-invalid.scala
@@ -27,7 +27,7 @@ object Test extends App {
val d = t member u.newTermName("d") asTermSymbol
val e = t member u.newTermName("e") asTermSymbol
- val n1 = a.resolveOverloaded(posVargs = List(u.typeOf[Char]))
+ val n1 = a.resolveOverloaded(posVargs = List(u.typeOf[Long]))
val n2 = b.resolveOverloaded(posVargs = List(u.typeOf[A]))
val n3 = c.resolveOverloaded(posVargs = List(u.typeOf[B], u.typeOf[B]))
val n4 = d.resolveOverloaded(targs = List(u.typeOf[Int]))
diff --git a/test/files/run/reflect-resolveoverload2.scala b/test/files/run/reflect-resolveoverload2.scala
index b5f719814b..a800a3e92c 100644
--- a/test/files/run/reflect-resolveoverload2.scala
+++ b/test/files/run/reflect-resolveoverload2.scala
@@ -2,16 +2,20 @@ class A
class B extends A
class C {
- def a(x: Int) = 1
- def a(x: String) = 2
- //def b(x: => Int)(s: String) = 1
- //def b(x: => String)(a: Array[_]) = 2
- def c(x: A) = 1
- def c(x: B) = 2
- //def d(x: => A)(s: String) = 1
- //def d(x: => B)(a: Array[_]) = 2
- def e(x: A) = 1
- def e(x: B = new B) = 2
+ def a(x: Int) = 1
+ def a(x: String) = 2
+ //def b(x: => Int)(s: String) = 1
+ //def b(x: => String)(a: Array[_]) = 2
+ def c(x: A) = 1
+ def c(x: B) = 2
+ //def d(x: => A)(s: String) = 1
+ //def d(x: => B)(a: Array[_]) = 2
+ def e(x: A) = 1
+ def e(x: B = new B) = 2
+ def f(x: Int) = 1
+ def f(x: String) = 2
+ def f(x: Long) = 3
+ def f(x: Double) = 4
}
object Test extends App {
@@ -29,6 +33,8 @@ object Test extends App {
}
assert(c.a(1) == invoke("a", 1, u.typeOf[Int]))
assert(c.a("a") == invoke("a", "a", u.typeOf[String]))
+ assert(c.a('a') == invoke("a", 'a', u.typeOf[Char]))
+ assert(c.a(3: Byte) == invoke("a", 3: Byte, u.typeOf[Byte]))
//assert(c.b(1)(null) == invoke("b", 1, u.typeOf[Int]))
//assert(c.b("a")(null) == invoke("b", "a", u.typeOf[String]))
assert(c.c(new A) == invoke("c", new A, u.typeOf[A]))
@@ -37,4 +43,9 @@ object Test extends App {
//assert(c.d(new B)(null) == invoke("d", new B, u.typeOf[B]))
assert(c.e(new A) == invoke("e", new A, u.typeOf[A]))
assert(c.e(new B) == invoke("e", new B, u.typeOf[B]))
+ assert(c.f(1: Short) == invoke("f", 1: Short, u.typeOf[Short]))
+ assert(c.f(2) == invoke("f", 2, u.typeOf[Int]))
+ assert(c.f(3L) == invoke("f", 3L, u.typeOf[Long]))
+ assert(c.f(4f) == invoke("f", 4f, u.typeOf[Float]))
+ assert(c.f(5d) == invoke("f", 5d, u.typeOf[Double]))
}
diff --git a/test/files/run/t5588.check b/test/files/run/t5588.check
new file mode 100644
index 0000000000..bb101b641b
--- /dev/null
+++ b/test/files/run/t5588.check
@@ -0,0 +1,2 @@
+true
+true
diff --git a/test/files/run/t5588.scala b/test/files/run/t5588.scala
new file mode 100644
index 0000000000..f214d16684
--- /dev/null
+++ b/test/files/run/t5588.scala
@@ -0,0 +1,14 @@
+object Test {
+ object MyEnum extends Enumeration {
+ val Foo = Value(2000000000)
+ val Bar = Value(-2000000000)
+ val X = Value(Integer.MAX_VALUE)
+ val Y = Value(Integer.MIN_VALUE)
+ }
+
+ import MyEnum._
+ def main(args: Array[String]) {
+ println(Foo > Bar)
+ println(X > Y)
+ }
+}
diff --git a/test/files/run/t5937.scala b/test/files/run/t5937.scala
new file mode 100644
index 0000000000..e5bf6617af
--- /dev/null
+++ b/test/files/run/t5937.scala
@@ -0,0 +1,12 @@
+
+
+
+import collection._
+
+
+
+object Test extends App {
+
+ val list: List[Int] = (immutable.Vector(1, 2, 3) :+ 4)(breakOut)
+
+}
diff --git a/test/files/run/t6028.check b/test/files/run/t6028.check
new file mode 100644
index 0000000000..dca61115ad
--- /dev/null
+++ b/test/files/run/t6028.check
@@ -0,0 +1,84 @@
+[[syntax trees at end of lambdalift]] // newSource1
+package <empty> {
+ class T extends Object {
+ <paramaccessor> val T$$classParam: Int = _;
+ def <init>(classParam: Int): T = {
+ T.super.<init>();
+ ()
+ };
+ private[this] val field: Int = 0;
+ <stable> <accessor> def field(): Int = T.this.field;
+ def foo(methodParam: Int): Function0 = {
+ val methodLocal: Int = 0;
+ {
+ (new anonymous class $anonfun$foo$1(T.this, methodParam, methodLocal): Function0)
+ }
+ };
+ def bar(barParam: Int): Object = {
+ @volatile var MethodLocalObject$module: scala.runtime.VolatileObjectRef = new scala.runtime.VolatileObjectRef(<empty>);
+ T.this.MethodLocalObject$1(barParam, MethodLocalObject$module)
+ };
+ def tryy(tryyParam: Int): Function0 = {
+ var tryyLocal: scala.runtime.IntRef = new scala.runtime.IntRef(0);
+ {
+ (new anonymous class $anonfun$tryy$1(T.this, tryyParam, tryyLocal): Function0)
+ }
+ };
+ @SerialVersionUID(0) final <synthetic> class $anonfun$foo$1 extends scala.runtime.AbstractFunction0$mcI$sp with Serializable {
+ def <init>($outer: T, methodParam$1: Int, methodLocal$1: Int): anonymous class $anonfun$foo$1 = {
+ $anonfun$foo$1.super.<init>();
+ ()
+ };
+ final def apply(): Int = $anonfun$foo$1.this.apply$mcI$sp();
+ <specialized> def apply$mcI$sp(): Int = $anonfun$foo$1.this.$outer.T$$classParam.+($anonfun$foo$1.this.$outer.field()).+($anonfun$foo$1.this.methodParam$1).+($anonfun$foo$1.this.methodLocal$1);
+ <synthetic> <paramaccessor> private[this] val $outer: T = _;
+ <synthetic> <stable> def T$$anonfun$$$outer(): T = $anonfun$foo$1.this.$outer;
+ final <bridge> def apply(): Object = scala.Int.box($anonfun$foo$1.this.apply());
+ <synthetic> <paramaccessor> private[this] val methodParam$1: Int = _;
+ <synthetic> <paramaccessor> private[this] val methodLocal$1: Int = _
+ };
+ abstract trait MethodLocalTrait$1 extends Object {
+ <synthetic> <stable> def T$MethodLocalTrait$$$outer(): T
+ };
+ object MethodLocalObject$2 extends Object with T#MethodLocalTrait$1 {
+ def <init>($outer: T, barParam$1: Int): ... = {
+ MethodLocalObject$2.super.<init>();
+ MethodLocalObject$2.this.$asInstanceOf[T#MethodLocalTrait$1$class]()./*MethodLocalTrait$1$class*/$init$(barParam$1);
+ ()
+ };
+ <synthetic> <paramaccessor> private[this] val $outer: T = _;
+ <synthetic> <stable> def T$MethodLocalObject$$$outer(): T = MethodLocalObject$2.this.$outer;
+ <synthetic> <stable> def T$MethodLocalTrait$$$outer(): T = MethodLocalObject$2.this.$outer
+ };
+ final <stable> private[this] def MethodLocalObject$1(barParam$1: Int, MethodLocalObject$module$1: scala.runtime.VolatileObjectRef): ... = {
+ MethodLocalObject$module$1.elem = new ...(T.this, barParam$1);
+ MethodLocalObject$module$1.elem.$asInstanceOf[...]()
+ };
+ abstract trait MethodLocalTrait$1$class extends Object with T#MethodLocalTrait$1 {
+ def /*MethodLocalTrait$1$class*/$init$(barParam$1: Int): Unit = {
+ ()
+ };
+ scala.this.Predef.print(scala.Int.box(barParam$1))
+ };
+ @SerialVersionUID(0) final <synthetic> class $anonfun$tryy$1 extends scala.runtime.AbstractFunction0$mcV$sp with Serializable {
+ def <init>($outer: T, tryyParam$1: Int, tryyLocal$1: scala.runtime.IntRef): anonymous class $anonfun$tryy$1 = {
+ $anonfun$tryy$1.super.<init>();
+ ()
+ };
+ final def apply(): Unit = $anonfun$tryy$1.this.apply$mcV$sp();
+ <specialized> def apply$mcV$sp(): Unit = try {
+ $anonfun$tryy$1.this.tryyLocal$1.elem = $anonfun$tryy$1.this.tryyParam$1
+ } finally ();
+ <synthetic> <paramaccessor> private[this] val $outer: T = _;
+ <synthetic> <stable> def T$$anonfun$$$outer(): T = $anonfun$tryy$1.this.$outer;
+ final <bridge> def apply(): Object = {
+ $anonfun$tryy$1.this.apply();
+ scala.runtime.BoxedUnit.UNIT
+ };
+ <synthetic> <paramaccessor> private[this] val tryyParam$1: Int = _;
+ <synthetic> <paramaccessor> private[this] val tryyLocal$1: scala.runtime.IntRef = _
+ }
+ }
+}
+
+warning: there were 1 feature warnings; re-run with -feature for details
diff --git a/test/files/run/t6028.scala b/test/files/run/t6028.scala
new file mode 100644
index 0000000000..cab17535fc
--- /dev/null
+++ b/test/files/run/t6028.scala
@@ -0,0 +1,21 @@
+import scala.tools.partest._
+import java.io.{Console => _, _}
+
+object Test extends DirectTest {
+
+ override def extraSettings: String = "-usejavacp -Xprint:lambdalift -d " + testOutput.path
+
+ override def code = """class T(classParam: Int) {
+ | val field: Int = 0
+ | def foo(methodParam: Int) = {val methodLocal = 0 ; () => classParam + field + methodParam + methodLocal }
+ | def bar(barParam: Int) = { trait MethodLocalTrait { print(barParam) }; object MethodLocalObject extends MethodLocalTrait; MethodLocalObject }
+ | def tryy(tryyParam: Int) = { var tryyLocal = 0; () => try { tryyLocal = tryyParam } finally () }
+ |}
+ |""".stripMargin.trim
+
+ override def show(): Unit = {
+ Console.withErr(System.out) {
+ compile()
+ }
+ }
+}
diff --git a/test/files/run/t6077_patmat_cse_irrefutable.check b/test/files/run/t6077_patmat_cse_irrefutable.check
new file mode 100644
index 0000000000..9766475a41
--- /dev/null
+++ b/test/files/run/t6077_patmat_cse_irrefutable.check
@@ -0,0 +1 @@
+ok
diff --git a/test/files/run/t6077_patmat_cse_irrefutable.scala b/test/files/run/t6077_patmat_cse_irrefutable.scala
new file mode 100644
index 0000000000..b130ae7813
--- /dev/null
+++ b/test/files/run/t6077_patmat_cse_irrefutable.scala
@@ -0,0 +1,13 @@
+class LiteralNode(val value: Any)
+
+object LiteralNode {
+ // irrefutable
+ def unapply(n: LiteralNode) = Some(n.value)
+}
+
+object Test extends App {
+ ((new LiteralNode(false)): Any) match {
+ case LiteralNode(true) => println("uh-oh")
+ case LiteralNode(false) => println("ok")
+ }
+} \ No newline at end of file
diff --git a/test/files/run/t6089.check b/test/files/run/t6089.check
new file mode 100644
index 0000000000..a8d4424106
--- /dev/null
+++ b/test/files/run/t6089.check
@@ -0,0 +1 @@
+scala.MatchError: Foo(0) (of class Foo)
diff --git a/test/files/run/t6089.scala b/test/files/run/t6089.scala
new file mode 100644
index 0000000000..c72d7ba792
--- /dev/null
+++ b/test/files/run/t6089.scala
@@ -0,0 +1,13 @@
+case class Foo(x: Int)
+
+object Test {
+ def bippo(result: Boolean): Boolean = result
+ def bungus(m: Foo): Boolean =
+ bippo(m match { case Foo(2) => bungus(m) })
+
+ def main(args: Array[String]): Unit = try {
+ bungus(Foo(0))
+ } catch {
+ case x: MatchError => println(x)
+ }
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-classmanifest-basic.check b/test/files/run/valueclasses-classmanifest-basic.check
new file mode 100644
index 0000000000..554c75e074
--- /dev/null
+++ b/test/files/run/valueclasses-classmanifest-basic.check
@@ -0,0 +1 @@
+Foo
diff --git a/test/files/run/valueclasses-classmanifest-basic.scala b/test/files/run/valueclasses-classmanifest-basic.scala
new file mode 100644
index 0000000000..c2aa08ef86
--- /dev/null
+++ b/test/files/run/valueclasses-classmanifest-basic.scala
@@ -0,0 +1,5 @@
+class Foo(val x: Int) extends AnyVal
+
+object Test extends App {
+ println(classManifest[Foo])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-classmanifest-existential.check b/test/files/run/valueclasses-classmanifest-existential.check
new file mode 100644
index 0000000000..e9fc6e27ea
--- /dev/null
+++ b/test/files/run/valueclasses-classmanifest-existential.check
@@ -0,0 +1 @@
+Foo[<?>]
diff --git a/test/files/run/valueclasses-classmanifest-existential.scala b/test/files/run/valueclasses-classmanifest-existential.scala
new file mode 100644
index 0000000000..11999df678
--- /dev/null
+++ b/test/files/run/valueclasses-classmanifest-existential.scala
@@ -0,0 +1,5 @@
+class Foo[T](val x: T) extends AnyVal
+
+object Test extends App {
+ println(classManifest[Foo[_]])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-classmanifest-generic.check b/test/files/run/valueclasses-classmanifest-generic.check
new file mode 100644
index 0000000000..1418c5cff9
--- /dev/null
+++ b/test/files/run/valueclasses-classmanifest-generic.check
@@ -0,0 +1 @@
+Foo[java.lang.String]
diff --git a/test/files/run/valueclasses-classmanifest-generic.scala b/test/files/run/valueclasses-classmanifest-generic.scala
new file mode 100644
index 0000000000..280152dc1d
--- /dev/null
+++ b/test/files/run/valueclasses-classmanifest-generic.scala
@@ -0,0 +1,5 @@
+class Foo[T](val x: T) extends AnyVal
+
+object Test extends App {
+ println(classManifest[Foo[String]])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-classtag-basic.check b/test/files/run/valueclasses-classtag-basic.check
new file mode 100644
index 0000000000..0c13986b32
--- /dev/null
+++ b/test/files/run/valueclasses-classtag-basic.check
@@ -0,0 +1 @@
+ClassTag[class Foo]
diff --git a/test/files/run/valueclasses-classtag-basic.scala b/test/files/run/valueclasses-classtag-basic.scala
new file mode 100644
index 0000000000..912a4bb019
--- /dev/null
+++ b/test/files/run/valueclasses-classtag-basic.scala
@@ -0,0 +1,5 @@
+class Foo(val x: Int) extends AnyVal
+
+object Test extends App {
+ println(scala.reflect.classTag[Foo])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-classtag-existential.check b/test/files/run/valueclasses-classtag-existential.check
new file mode 100644
index 0000000000..95e94e7aee
--- /dev/null
+++ b/test/files/run/valueclasses-classtag-existential.check
@@ -0,0 +1 @@
+ClassTag[class java.lang.Object]
diff --git a/test/files/run/valueclasses-classtag-existential.scala b/test/files/run/valueclasses-classtag-existential.scala
new file mode 100644
index 0000000000..e0db9cdd75
--- /dev/null
+++ b/test/files/run/valueclasses-classtag-existential.scala
@@ -0,0 +1,5 @@
+class Foo[T](val x: T) extends AnyVal
+
+object Test extends App {
+ println(scala.reflect.classTag[Foo[_]])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-classtag-generic.check b/test/files/run/valueclasses-classtag-generic.check
new file mode 100644
index 0000000000..0c13986b32
--- /dev/null
+++ b/test/files/run/valueclasses-classtag-generic.check
@@ -0,0 +1 @@
+ClassTag[class Foo]
diff --git a/test/files/run/valueclasses-classtag-generic.scala b/test/files/run/valueclasses-classtag-generic.scala
new file mode 100644
index 0000000000..bd1f213835
--- /dev/null
+++ b/test/files/run/valueclasses-classtag-generic.scala
@@ -0,0 +1,5 @@
+class Foo[T](val x: T) extends AnyVal
+
+object Test extends App {
+ println(scala.reflect.classTag[Foo[String]])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-manifest-basic.check b/test/files/run/valueclasses-manifest-basic.check
new file mode 100644
index 0000000000..554c75e074
--- /dev/null
+++ b/test/files/run/valueclasses-manifest-basic.check
@@ -0,0 +1 @@
+Foo
diff --git a/test/files/run/valueclasses-manifest-basic.scala b/test/files/run/valueclasses-manifest-basic.scala
new file mode 100644
index 0000000000..eefab20168
--- /dev/null
+++ b/test/files/run/valueclasses-manifest-basic.scala
@@ -0,0 +1,5 @@
+class Foo(val x: Int) extends AnyVal
+
+object Test extends App {
+ println(manifest[Foo])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-manifest-existential.check b/test/files/run/valueclasses-manifest-existential.check
new file mode 100644
index 0000000000..fdce051039
--- /dev/null
+++ b/test/files/run/valueclasses-manifest-existential.check
@@ -0,0 +1 @@
+Foo[_ <: Any]
diff --git a/test/files/run/valueclasses-manifest-existential.scala b/test/files/run/valueclasses-manifest-existential.scala
new file mode 100644
index 0000000000..47eb6d64dd
--- /dev/null
+++ b/test/files/run/valueclasses-manifest-existential.scala
@@ -0,0 +1,5 @@
+class Foo[T](val x: T) extends AnyVal
+
+object Test extends App {
+ println(manifest[Foo[_]])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-manifest-generic.check b/test/files/run/valueclasses-manifest-generic.check
new file mode 100644
index 0000000000..1418c5cff9
--- /dev/null
+++ b/test/files/run/valueclasses-manifest-generic.check
@@ -0,0 +1 @@
+Foo[java.lang.String]
diff --git a/test/files/run/valueclasses-manifest-generic.scala b/test/files/run/valueclasses-manifest-generic.scala
new file mode 100644
index 0000000000..18313fba6f
--- /dev/null
+++ b/test/files/run/valueclasses-manifest-generic.scala
@@ -0,0 +1,5 @@
+class Foo[T](val x: T) extends AnyVal
+
+object Test extends App {
+ println(manifest[Foo[String]])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-typetag-basic.check b/test/files/run/valueclasses-typetag-basic.check
new file mode 100644
index 0000000000..554c75e074
--- /dev/null
+++ b/test/files/run/valueclasses-typetag-basic.check
@@ -0,0 +1 @@
+Foo
diff --git a/test/files/run/valueclasses-typetag-basic.scala b/test/files/run/valueclasses-typetag-basic.scala
new file mode 100644
index 0000000000..d0243f7378
--- /dev/null
+++ b/test/files/run/valueclasses-typetag-basic.scala
@@ -0,0 +1,5 @@
+class Foo(val x: Int) extends AnyVal
+
+object Test extends App {
+ println(scala.reflect.runtime.universe.typeOf[Foo])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-typetag-existential.check b/test/files/run/valueclasses-typetag-existential.check
new file mode 100644
index 0000000000..0efa24a45f
--- /dev/null
+++ b/test/files/run/valueclasses-typetag-existential.check
@@ -0,0 +1 @@
+Foo[_]
diff --git a/test/files/run/valueclasses-typetag-existential.scala b/test/files/run/valueclasses-typetag-existential.scala
new file mode 100644
index 0000000000..4cdaa44a83
--- /dev/null
+++ b/test/files/run/valueclasses-typetag-existential.scala
@@ -0,0 +1,5 @@
+class Foo[T](val x: T) extends AnyVal
+
+object Test extends App {
+ println(scala.reflect.runtime.universe.typeOf[Foo[_]])
+} \ No newline at end of file
diff --git a/test/files/run/valueclasses-typetag-generic.check b/test/files/run/valueclasses-typetag-generic.check
new file mode 100644
index 0000000000..fce2e64f79
--- /dev/null
+++ b/test/files/run/valueclasses-typetag-generic.check
@@ -0,0 +1 @@
+Foo[String]
diff --git a/test/files/run/valueclasses-typetag-generic.scala b/test/files/run/valueclasses-typetag-generic.scala
new file mode 100644
index 0000000000..eb32dfcadb
--- /dev/null
+++ b/test/files/run/valueclasses-typetag-generic.scala
@@ -0,0 +1,5 @@
+class Foo[T](val x: T) extends AnyVal
+
+object Test extends App {
+ println(scala.reflect.runtime.universe.typeOf[Foo[String]])
+} \ No newline at end of file
diff --git a/test/files/specialized/t6035.check b/test/files/specialized/t6035.check
new file mode 100644
index 0000000000..573541ac97
--- /dev/null
+++ b/test/files/specialized/t6035.check
@@ -0,0 +1 @@
+0
diff --git a/test/files/specialized/t6035/first_1.scala b/test/files/specialized/t6035/first_1.scala
new file mode 100644
index 0000000000..1289e9f48e
--- /dev/null
+++ b/test/files/specialized/t6035/first_1.scala
@@ -0,0 +1,5 @@
+trait Foo[@specialized(Int) A] {
+ def foo(x: A): A
+}
+
+abstract class Inter extends Foo[Int]
diff --git a/test/files/specialized/t6035/second_2.scala b/test/files/specialized/t6035/second_2.scala
new file mode 100644
index 0000000000..fb317e2a6a
--- /dev/null
+++ b/test/files/specialized/t6035/second_2.scala
@@ -0,0 +1,13 @@
+class Baz extends Inter {
+ def foo(x: Int) = x + 1
+}
+
+object Test {
+ def main(args: Array[String]) {
+ // it's important that the type is Inter so we do not call Baz.foo(I)I directly!
+ val baz: Inter = new Baz
+ // here we should go through specialized version of foo and thus have zero boxing
+ baz.foo(1)
+ println(runtime.BoxesRunTime.integerBoxCount)
+ }
+}
diff --git a/test/files/pos/t1751.cmds b/test/pending/pos/t1751.cmds
index d4a4898ffd..d4a4898ffd 100644
--- a/test/files/pos/t1751.cmds
+++ b/test/pending/pos/t1751.cmds
diff --git a/test/files/pos/t1751/A1_2.scala b/test/pending/pos/t1751/A1_2.scala
index 354d5eecd0..354d5eecd0 100644
--- a/test/files/pos/t1751/A1_2.scala
+++ b/test/pending/pos/t1751/A1_2.scala
diff --git a/test/files/pos/t1751/A2_1.scala b/test/pending/pos/t1751/A2_1.scala
index c768062e43..c768062e43 100644
--- a/test/files/pos/t1751/A2_1.scala
+++ b/test/pending/pos/t1751/A2_1.scala
diff --git a/test/files/pos/t1751/SuiteClasses.java b/test/pending/pos/t1751/SuiteClasses.java
index a415e4f572..a415e4f572 100644
--- a/test/files/pos/t1751/SuiteClasses.java
+++ b/test/pending/pos/t1751/SuiteClasses.java
diff --git a/test/files/pos/t1782.cmds b/test/pending/pos/t1782.cmds
index 61f3d3788e..61f3d3788e 100644
--- a/test/files/pos/t1782.cmds
+++ b/test/pending/pos/t1782.cmds
diff --git a/test/files/pos/t1782/Ann.java b/test/pending/pos/t1782/Ann.java
index 0dcfbd2ed7..0dcfbd2ed7 100644
--- a/test/files/pos/t1782/Ann.java
+++ b/test/pending/pos/t1782/Ann.java
diff --git a/test/files/pos/t1782/Days.java b/test/pending/pos/t1782/Days.java
index 203a87b1c2..203a87b1c2 100644
--- a/test/files/pos/t1782/Days.java
+++ b/test/pending/pos/t1782/Days.java
diff --git a/test/files/pos/t1782/ImplementedBy.java b/test/pending/pos/t1782/ImplementedBy.java
index 6aa8b4fa9e..6aa8b4fa9e 100644
--- a/test/files/pos/t1782/ImplementedBy.java
+++ b/test/pending/pos/t1782/ImplementedBy.java
diff --git a/test/files/pos/t1782/Test_1.scala b/test/pending/pos/t1782/Test_1.scala
index 6467a74c29..6467a74c29 100644
--- a/test/files/pos/t1782/Test_1.scala
+++ b/test/pending/pos/t1782/Test_1.scala
diff --git a/test/files/pos/t294.cmds b/test/pending/pos/t294.cmds
index 62c9a5a068..62c9a5a068 100644
--- a/test/files/pos/t294.cmds
+++ b/test/pending/pos/t294.cmds
diff --git a/test/files/pos/t294/Ann.java b/test/pending/pos/t294/Ann.java
index 934ca46297..934ca46297 100644
--- a/test/files/pos/t294/Ann.java
+++ b/test/pending/pos/t294/Ann.java
diff --git a/test/files/pos/t294/Ann2.java b/test/pending/pos/t294/Ann2.java
index 025b79e794..025b79e794 100644
--- a/test/files/pos/t294/Ann2.java
+++ b/test/pending/pos/t294/Ann2.java
diff --git a/test/files/pos/t294/Test_1.scala b/test/pending/pos/t294/Test_1.scala
index ff1f34b10e..ff1f34b10e 100644
--- a/test/files/pos/t294/Test_1.scala
+++ b/test/pending/pos/t294/Test_1.scala
diff --git a/test/files/pos/t294/Test_2.scala b/test/pending/pos/t294/Test_2.scala
index 9fb1c6e175..9fb1c6e175 100644
--- a/test/files/pos/t294/Test_2.scala
+++ b/test/pending/pos/t294/Test_2.scala
diff --git a/test/files/run/t3897.check b/test/pending/run/t3897.check
index 244b83716f..244b83716f 100644
--- a/test/files/run/t3897.check
+++ b/test/pending/run/t3897.check
diff --git a/test/files/run/t3897/J_2.java b/test/pending/run/t3897/J_2.java
index 178412dc92..178412dc92 100644
--- a/test/files/run/t3897/J_2.java
+++ b/test/pending/run/t3897/J_2.java
diff --git a/test/files/run/t3897/a_1.scala b/test/pending/run/t3897/a_1.scala
index 4da959e2ac..4da959e2ac 100644
--- a/test/files/run/t3897/a_1.scala
+++ b/test/pending/run/t3897/a_1.scala
diff --git a/test/files/run/t3897/a_2.scala b/test/pending/run/t3897/a_2.scala
index 4d9e59ef05..4d9e59ef05 100644
--- a/test/files/run/t3897/a_2.scala
+++ b/test/pending/run/t3897/a_2.scala
diff --git a/test/files/run/t5293-map.scala b/test/pending/run/t5293-map.scala
index 2707aed07e..2707aed07e 100644
--- a/test/files/run/t5293-map.scala
+++ b/test/pending/run/t5293-map.scala
diff --git a/test/files/run/t5293.scala b/test/pending/run/t5293.scala
index 01ead45d2a..01ead45d2a 100644
--- a/test/files/run/t5293.scala
+++ b/test/pending/run/t5293.scala
diff --git a/test/pending/run/t5695.check b/test/pending/run/t5695.check
deleted file mode 100644
index d50069ab4f..0000000000
--- a/test/pending/run/t5695.check
+++ /dev/null
@@ -1,2 +0,0 @@
-..
-..
diff --git a/test/pending/run/t5695/part_1.scala b/test/pending/run/t5695/part_1.scala
deleted file mode 100644
index b8e8f8e52f..0000000000
--- a/test/pending/run/t5695/part_1.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-import language.experimental.macros
-import scala.reflect.makro.Context
-
-object Defs {
-
- def mkInt = macro mkIntImpl
- def mkIntImpl(c: Context): c.Expr[Any] = {
- println(c.enclosingApplication)
- c.reify{ 23 }
- }
-
-}
diff --git a/test/pending/run/t5695/part_2.scala b/test/pending/run/t5695/part_2.scala
deleted file mode 100644
index d34219437d..0000000000
--- a/test/pending/run/t5695/part_2.scala
+++ /dev/null
@@ -1,8 +0,0 @@
-import Defs._
-
-object Test extends App {
-
- val i1 = mkInt
- val i2 = identity(mkInt)
-
-}