summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/jvm/interpreter.check4
-rw-r--r--test/files/jvm/serialization-new.check4
-rw-r--r--test/files/jvm/t8786-sig.scala116
-rw-r--r--test/files/jvm/t8786/A_1.scala3
-rw-r--r--test/files/jvm/t8786/B_2.java22
-rw-r--r--test/files/jvm/t8786/Test_2.scala3
-rw-r--r--test/files/jvm/varargs/JavaClass.java26
-rw-r--r--test/files/jvm/varargs/VaClass.scala9
-rw-r--r--test/files/jvm/varargs/varargs.scala16
-rw-r--r--test/files/neg/t7187.check6
-rw-r--r--test/files/neg/t7187.flags1
-rw-r--r--test/files/neg/t7187.scala6
-rw-r--r--test/files/pos/t9178.flags1
-rw-r--r--test/files/pos/t9178.scala13
-rw-r--r--test/files/run/Course-2002-08.scala20
-rw-r--r--test/files/run/collection-stacks.check4
-rw-r--r--test/files/run/constrained-types.check8
-rw-r--r--test/files/run/iterator-from.scala2
-rw-r--r--test/files/run/reflection-magicsymbols-repl.check2
-rw-r--r--test/files/run/repl-no-imports-no-predef-power.check4
-rw-r--r--test/files/run/repl-power.check4
-rw-r--r--test/files/run/runtime.scala2
-rw-r--r--test/files/run/synchronized.scala2
-rw-r--r--test/files/run/t4172.check2
-rw-r--r--test/files/run/t4594-repl-settings.scala2
-rw-r--r--test/files/run/t4710.check2
-rw-r--r--test/files/run/t6329_repl.check8
-rw-r--r--test/files/run/t6329_repl_bug.check2
-rw-r--r--test/files/run/t7319.check6
29 files changed, 209 insertions, 91 deletions
diff --git a/test/files/jvm/interpreter.check b/test/files/jvm/interpreter.check
index 9a2162a906..72d8d39fd0 100644
--- a/test/files/jvm/interpreter.check
+++ b/test/files/jvm/interpreter.check
@@ -93,7 +93,7 @@ scala> case class Bar(n: Int)
defined class Bar
scala> implicit def foo2bar(foo: Foo) = Bar(foo.n)
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
foo2bar: (foo: Foo)Bar
scala> val bar: Bar = Foo(3)
@@ -267,7 +267,7 @@ scala> xs map (x => x)
res6: Array[_] = Array(1, 2)
scala> xs map (x => (x, x))
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
res7: Array[(_$1, _$1)] forSome { type _$1 } = Array((1,1), (2,2))
scala>
diff --git a/test/files/jvm/serialization-new.check b/test/files/jvm/serialization-new.check
index 964c68e528..90da8a085d 100644
--- a/test/files/jvm/serialization-new.check
+++ b/test/files/jvm/serialization-new.check
@@ -1,6 +1,6 @@
warning: there were two deprecation warnings (since 2.11.0)
-warning: there was one deprecation warning (since 2.12.0)
-warning: there were three deprecation warnings in total; re-run with -deprecation for details
+warning: there were three deprecation warnings (since 2.12.0)
+warning: there were 5 deprecation warnings in total; re-run with -deprecation for details
a1 = Array[1,2,3]
_a1 = Array[1,2,3]
arrayEquals(a1, _a1): true
diff --git a/test/files/jvm/t8786-sig.scala b/test/files/jvm/t8786-sig.scala
new file mode 100644
index 0000000000..0745b650e6
--- /dev/null
+++ b/test/files/jvm/t8786-sig.scala
@@ -0,0 +1,116 @@
+class A[U] {
+ @annotation.varargs def m1[T] (a: T*): T = a.head
+ @annotation.varargs def m2[T <: AnyRef](a: T*): T = a.head
+ @annotation.varargs def m3[T <: AnyVal](a: T*): T = a.head
+ @annotation.varargs def m4[T <: Int] (a: T*): T = a.head
+ @annotation.varargs def m5[T <: String](a: T*): T = a.head
+ @annotation.varargs def m6 (a: String*): String = a.head
+ @annotation.varargs def m7 (a: Int*): Int = a.head
+ @annotation.varargs def m8 (a: U*): U = a.head
+
+ def n1[T] (a: Array[T]): T = a(0)
+ def n2[T <: AnyRef](a: Array[T]): T = a(0)
+ def n3[T <: AnyVal](a: Array[T]): T = a(0)
+ def n4[T <: Int] (a: Array[T]): T = a(0)
+ def n5[T <: String](a: Array[T]): T = a(0)
+ def n6 (a: Array[String]): String = a(0)
+ def n7 (a: Array[Int]): Int = a(0)
+ def n8 (a: Array[U]): U = a(0)
+}
+
+object Test extends App {
+ val a = classOf[A[_]]
+
+ def sig (method: String, tp: Class[_]) = a.getDeclaredMethod(method, tp).toString
+ def genSig(method: String, tp: Class[_]) = a.getDeclaredMethod(method, tp).toGenericString
+ def bound (method: String, tp: Class[_]) = {
+ val m = a.getDeclaredMethod(method, tp)
+ m.getGenericParameterTypes.apply(0) match {
+ case _: Class[_] => ""
+ case gat: java.lang.reflect.GenericArrayType =>
+ val compTp = gat.getGenericComponentType.asInstanceOf[java.lang.reflect.TypeVariable[_]]
+ compTp.getBounds.apply(0).toString
+ }
+ }
+
+ def check(a: String, b: String) = {
+ assert(a == b, s"found: $a\nexpected: $b")
+ }
+
+ val sq = classOf[Seq[_]]
+ val ob = classOf[Object]
+ val ao = classOf[Array[Object]]
+ val as = classOf[Array[String]]
+ val ai = classOf[Array[Int]]
+
+ check(sig("m1", sq) , "public java.lang.Object A.m1(scala.collection.Seq)")
+ check(sig("m2", sq) , "public java.lang.Object A.m2(scala.collection.Seq)")
+ check(sig("m3", sq) , "public java.lang.Object A.m3(scala.collection.Seq)")
+ check(sig("m4", sq) , "public int A.m4(scala.collection.Seq)")
+ check(sig("m5", sq) , "public java.lang.String A.m5(scala.collection.Seq)")
+ check(sig("m6", sq) , "public java.lang.String A.m6(scala.collection.Seq)")
+ check(sig("m7", sq) , "public int A.m7(scala.collection.Seq)")
+ check(sig("m8", sq) , "public java.lang.Object A.m8(scala.collection.Seq)")
+
+ check(genSig("m1", sq), "public <T> T A.m1(scala.collection.Seq<T>)")
+ check(genSig("m2", sq), "public <T> T A.m2(scala.collection.Seq<T>)")
+ check(genSig("m3", sq), "public <T> T A.m3(scala.collection.Seq<T>)")
+ // TODO: the signature for is wrong for T <: Int, SI-9846. The signature should be
+ // `public int A.m4(scala.collection.Seq<java.lang.Object>)`. This is testing the status quo.
+ check(genSig("m4", sq), "public <T> T A.m4(scala.collection.Seq<T>)")
+ check(genSig("m5", sq), "public <T> T A.m5(scala.collection.Seq<T>)")
+ check(genSig("m6", sq), "public java.lang.String A.m6(scala.collection.Seq<java.lang.String>)")
+ check(genSig("m7", sq), "public int A.m7(scala.collection.Seq<java.lang.Object>)")
+ check(genSig("m8", sq), "public U A.m8(scala.collection.Seq<U>)")
+
+
+ // varargs forwarder
+
+ check(sig("m1", ao) , "public java.lang.Object A.m1(java.lang.Object[])")
+ check(sig("m2", ao) , "public java.lang.Object A.m2(java.lang.Object[])")
+ check(sig("m3", ao) , "public java.lang.Object A.m3(java.lang.Object[])")
+ check(sig("m4", ao) , "public int A.m4(java.lang.Object[])")
+ check(sig("m5", as) , "public java.lang.String A.m5(java.lang.String[])")
+ check(sig("m6", as) , "public java.lang.String A.m6(java.lang.String[])")
+ check(sig("m7", ai) , "public int A.m7(int[])")
+ check(sig("m8", ao) , "public java.lang.Object A.m8(java.lang.Object[])")
+
+ check(genSig("m1", ao), "public <T> T A.m1(T...)")
+ check(genSig("m2", ao), "public <T> T A.m2(T...)")
+ check(genSig("m3", ao), "public <T> T A.m3(T...)")
+ // testing status quo: signature is wrong for T <: Int, SI-9846
+ check(genSig("m4", ao), "public <T> T A.m4(T...)")
+ check(genSig("m5", as), "public <T> T A.m5(T...)")
+ check(genSig("m6", as), "public java.lang.String A.m6(java.lang.String...)")
+ check(genSig("m7", ai), "public int A.m7(int...)")
+ check(genSig("m8", ao), "public U A.m8(U...)")
+
+ check(bound("m1", ao) , "class java.lang.Object")
+ check(bound("m2", ao) , "class java.lang.Object")
+ check(bound("m3", ao) , "class java.lang.Object")
+ check(bound("m4", ao) , "class java.lang.Object")
+ check(bound("m5", as) , "class java.lang.String")
+ check(bound("m6", as) , "")
+ check(bound("m7", ai) , "")
+ check(bound("m8", ao) , "class java.lang.Object")
+
+
+ check(sig("n1", ob) , "public java.lang.Object A.n1(java.lang.Object)")
+ check(sig("n2", ao) , "public java.lang.Object A.n2(java.lang.Object[])")
+ check(sig("n3", ob) , "public java.lang.Object A.n3(java.lang.Object)")
+ check(sig("n4", ob) , "public int A.n4(java.lang.Object)")
+ check(sig("n5", as) , "public java.lang.String A.n5(java.lang.String[])")
+ check(sig("n6", as) , "public java.lang.String A.n6(java.lang.String[])")
+ check(sig("n7", ai) , "public int A.n7(int[])")
+ check(sig("n8", ob) , "public java.lang.Object A.n8(java.lang.Object)")
+
+ check(genSig("n1", ob), "public <T> T A.n1(java.lang.Object)")
+ check(genSig("n2", ao), "public <T> T A.n2(T[])")
+ check(genSig("n3", ob), "public <T> T A.n3(java.lang.Object)")
+ // testing status quo: signature is wrong for T <: Int, SI-9846
+ check(genSig("n4", ob), "public <T> T A.n4(java.lang.Object)")
+ check(genSig("n5", as), "public <T> T A.n5(T[])")
+ check(genSig("n6", as), "public java.lang.String A.n6(java.lang.String[])")
+ check(genSig("n7", ai), "public int A.n7(int[])")
+ check(genSig("n8", ob), "public U A.n8(java.lang.Object)")
+}
diff --git a/test/files/jvm/t8786/A_1.scala b/test/files/jvm/t8786/A_1.scala
new file mode 100644
index 0000000000..13c0ad191d
--- /dev/null
+++ b/test/files/jvm/t8786/A_1.scala
@@ -0,0 +1,3 @@
+class A {
+ @annotation.varargs def foo[T](a: Int, b: T*): T = b.head
+}
diff --git a/test/files/jvm/t8786/B_2.java b/test/files/jvm/t8786/B_2.java
new file mode 100644
index 0000000000..dc155a290f
--- /dev/null
+++ b/test/files/jvm/t8786/B_2.java
@@ -0,0 +1,22 @@
+public class B_2 {
+ private static int res = 0;
+
+ public static void m(char a[]) { res += 10; }
+ public static void m(String a) { res += 100; }
+ public static void m(Object a) { res += 1000; }
+
+ public static <T> T foo(int a, T... b) { return b[0]; }
+
+ public static <T> T bar(T b[]) { return b[0]; }
+
+ public static void main(String[] args) {
+ m(foo(15, "a", "b", "c"));
+ if (res != 100)
+ throw new Error("bad: "+ res);
+
+ A a = new A();
+ m(a.foo(16, "a", "b", "c"));
+ if (res != 200)
+ throw new Error("bad: " + res);
+ }
+}
diff --git a/test/files/jvm/t8786/Test_2.scala b/test/files/jvm/t8786/Test_2.scala
new file mode 100644
index 0000000000..76ccb4c3ed
--- /dev/null
+++ b/test/files/jvm/t8786/Test_2.scala
@@ -0,0 +1,3 @@
+object Test extends App {
+ B_2.main(null)
+}
diff --git a/test/files/jvm/varargs/JavaClass.java b/test/files/jvm/varargs/JavaClass.java
index 6928ee5adc..0cc3587c5e 100644
--- a/test/files/jvm/varargs/JavaClass.java
+++ b/test/files/jvm/varargs/JavaClass.java
@@ -1,16 +1,12 @@
-
-
-
public class JavaClass {
- public static <T> void varargz(int i, T... v) {
- }
-
- public static void callSomeAnnotations() {
- VaClass va = new VaClass();
- va.vs(4, "", "", "");
- va.vi(1, 2, 3, 4);
- varargz(5, 1.0, 2.0, 3.0);
- va.vt(16, "", "", "");
- System.out.println(va.vt1(16, "a", "b", "c"));
- }
-} \ No newline at end of file
+ public static <T> void varargz(int i, T... v) { }
+
+ public static void callSomeAnnotations() {
+ VaClass va = new VaClass();
+ va.vs(4, "", "", "");
+ va.vi(1, 2, 3, 4);
+ varargz(5, 1.0, 2.0, 3.0);
+ va.vt(16, "", "", "");
+ System.out.println(va.vt1(16, "a", "b", "c"));
+ }
+}
diff --git a/test/files/jvm/varargs/VaClass.scala b/test/files/jvm/varargs/VaClass.scala
index d83e63ace1..ee8c288a16 100644
--- a/test/files/jvm/varargs/VaClass.scala
+++ b/test/files/jvm/varargs/VaClass.scala
@@ -1,15 +1,8 @@
-
-
import annotation.varargs
-
-
class VaClass {
-
@varargs def vs(a: Int, b: String*) = println(a + b.length)
@varargs def vi(a: Int, b: Int*) = println(a + b.sum)
@varargs def vt[T](a: Int, b: T*) = println(a + b.length)
-
- // TODO remove type bound after fixing SI-8786, see also https://github.com/scala/scala/pull/3961
- @varargs def vt1[T <: String](a: Int, b: T*): T = b.head
+ @varargs def vt1[T](a: Int, b: T*): T = b.head
}
diff --git a/test/files/jvm/varargs/varargs.scala b/test/files/jvm/varargs/varargs.scala
index 6d2e707bdf..b09818f46f 100644
--- a/test/files/jvm/varargs/varargs.scala
+++ b/test/files/jvm/varargs/varargs.scala
@@ -1,21 +1,5 @@
-
-
-
-
-
-
object Test {
def main(args: Array[String]) {
JavaClass.callSomeAnnotations
}
}
-
-
-
-
-
-
-
-
-
-
diff --git a/test/files/neg/t7187.check b/test/files/neg/t7187.check
new file mode 100644
index 0000000000..a30803c746
--- /dev/null
+++ b/test/files/neg/t7187.check
@@ -0,0 +1,6 @@
+t7187.scala:3: warning: Eta-expansion of zero-argument method values is deprecated. Did you intend to write EtaExpandZeroArg.this.foo()?
+ val f: () => Any = foo
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
+one error found
diff --git a/test/files/neg/t7187.flags b/test/files/neg/t7187.flags
new file mode 100644
index 0000000000..c6bfaf1f64
--- /dev/null
+++ b/test/files/neg/t7187.flags
@@ -0,0 +1 @@
+-deprecation -Xfatal-warnings
diff --git a/test/files/neg/t7187.scala b/test/files/neg/t7187.scala
new file mode 100644
index 0000000000..45d33f06af
--- /dev/null
+++ b/test/files/neg/t7187.scala
@@ -0,0 +1,6 @@
+class EtaExpandZeroArg {
+ def foo(): () => String = () => ""
+ val f: () => Any = foo
+
+ // f() would evaluate to <function0> instead of ""
+}
diff --git a/test/files/pos/t9178.flags b/test/files/pos/t9178.flags
deleted file mode 100644
index 7de3c0f3ee..0000000000
--- a/test/files/pos/t9178.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xfatal-warnings -deprecation
diff --git a/test/files/pos/t9178.scala b/test/files/pos/t9178.scala
deleted file mode 100644
index f2cf20a778..0000000000
--- a/test/files/pos/t9178.scala
+++ /dev/null
@@ -1,13 +0,0 @@
-// eta expansion to Function0 is problematic (as shown here).
-// Perhaps we should we deprecate it? See discussion in the comments of
-// on SI-9178.
-//
-// This test encodes the status quo: no deprecation.
-object Test {
- def foo(): () => String = () => ""
- val f: () => Any = foo
-
- def main(args: Array[String]): Unit = {
- println(f()) // <function0>
- }
-}
diff --git a/test/files/run/Course-2002-08.scala b/test/files/run/Course-2002-08.scala
index 5e21edaba3..1d0e02262d 100644
--- a/test/files/run/Course-2002-08.scala
+++ b/test/files/run/Course-2002-08.scala
@@ -205,7 +205,7 @@ object M5 {
val inputSig = input.getSignal;
afterDelay(InverterDelay) {() => output.setSignal(!inputSig) };
}
- input addAction invertAction
+ input addAction invertAction _
}
def andGate(a1: Wire, a2: Wire, output: Wire): Unit = {
@@ -214,8 +214,8 @@ object M5 {
val a2Sig = a2.getSignal;
afterDelay(AndGateDelay) {() => output.setSignal(a1Sig & a2Sig) };
}
- a1 addAction andAction;
- a2 addAction andAction;
+ a1 addAction andAction _
+ a2 addAction andAction _
}
def orGate(o1: Wire, o2: Wire, output: Wire): Unit = {
@@ -224,8 +224,8 @@ object M5 {
val o2Sig = o2.getSignal;
afterDelay(OrGateDelay) {() => output.setSignal(o1Sig | o2Sig) };
}
- o1 addAction orAction;
- o2 addAction orAction;
+ o1 addAction orAction _
+ o2 addAction orAction _
}
def probe(name: String, wire: Wire): Unit = {
@@ -479,7 +479,7 @@ abstract class BasicCircuitSimulator() extends Simulator() {
val inputSig = input.getSignal;
afterDelay(InverterDelay) {() => output.setSignal(!inputSig) };
}
- input addAction invertAction
+ input addAction invertAction _
}
def andGate(a1: Wire, a2: Wire, output: Wire) = {
@@ -488,8 +488,8 @@ abstract class BasicCircuitSimulator() extends Simulator() {
val a2Sig = a2.getSignal;
afterDelay(AndGateDelay) {() => output.setSignal(a1Sig & a2Sig) };
}
- a1 addAction andAction;
- a2 addAction andAction
+ a1 addAction andAction _
+ a2 addAction andAction _
}
def orGate(a1: Wire, a2: Wire, output: Wire) = {
@@ -498,8 +498,8 @@ abstract class BasicCircuitSimulator() extends Simulator() {
val a2Sig = a2.getSignal;
afterDelay(OrGateDelay) {() => output.setSignal(a1Sig | a2Sig) };
}
- a1 addAction orAction;
- a2 addAction orAction
+ a1 addAction orAction _
+ a2 addAction orAction _
}
def orGate2(a1: Wire, a2: Wire, output: Wire) = {
diff --git a/test/files/run/collection-stacks.check b/test/files/run/collection-stacks.check
index 826e3a87f8..cd87cc61e4 100644
--- a/test/files/run/collection-stacks.check
+++ b/test/files/run/collection-stacks.check
@@ -1,4 +1,6 @@
-warning: there was one deprecation warning (since 2.11.0); re-run with -deprecation for details
+warning: there was one deprecation warning (since 2.11.0)
+warning: there were two deprecation warnings (since 2.12.0)
+warning: there were three deprecation warnings in total; re-run with -deprecation for details
3-2-1: true
3-2-1: true
apply
diff --git a/test/files/run/constrained-types.check b/test/files/run/constrained-types.check
index 5444cf2088..4acd9d16ae 100644
--- a/test/files/run/constrained-types.check
+++ b/test/files/run/constrained-types.check
@@ -69,11 +69,11 @@ scala> var four = "four"
four: String = four
scala> val four2 = m(four) // should have an existential bound
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
four2: String @Annot(x) forSome { val x: String } = four
scala> val four3 = four2 // should have the same type as four2
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
four3: String @Annot(x) forSome { val x: String } = four
scala> val stuff = m("stuff") // should not crash
@@ -96,7 +96,7 @@ scala> def m = {
val y : String @Annot(x) = x
y
} // x should not escape the local scope with a narrow type
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
m: String @Annot(x) forSome { val x: String }
scala>
@@ -110,7 +110,7 @@ scala> def n(y: String) = {
}
m("stuff".stripMargin)
} // x should be existentially bound
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
n: (y: String)String @Annot(x) forSome { val x: String }
scala>
diff --git a/test/files/run/iterator-from.scala b/test/files/run/iterator-from.scala
index e7ba1aeb28..01006ffc21 100644
--- a/test/files/run/iterator-from.scala
+++ b/test/files/run/iterator-from.scala
@@ -1,5 +1,5 @@
/* This file tests iteratorFrom, keysIteratorFrom, and valueIteratorFrom on various sorted sets and maps
- * filter: inliner warnings; re-run with
+ * filter: inliner warnings
*/
import scala.util.{Random => R}
diff --git a/test/files/run/reflection-magicsymbols-repl.check b/test/files/run/reflection-magicsymbols-repl.check
index dd26c08349..a33f41012e 100644
--- a/test/files/run/reflection-magicsymbols-repl.check
+++ b/test/files/run/reflection-magicsymbols-repl.check
@@ -19,7 +19,7 @@ scala> def test(n: Int): Unit = {
val x = sig.asInstanceOf[MethodType].params.head
println(x.info)
}
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
test: (n: Int)Unit
scala> for (i <- 1 to 8) test(i)
diff --git a/test/files/run/repl-no-imports-no-predef-power.check b/test/files/run/repl-no-imports-no-predef-power.check
index a76db3dbc2..08f614eb60 100644
--- a/test/files/run/repl-no-imports-no-predef-power.check
+++ b/test/files/run/repl-no-imports-no-predef-power.check
@@ -7,11 +7,11 @@ Try :help or completions for vals._ and power._
scala> // guarding against "error: reference to global is ambiguous"
scala> global.emptyValDef // "it is imported twice in the same scope by ..."
-warning: there was one deprecation warning (since 2.11.0); re-run with -deprecation for details
+warning: there was one deprecation warning (since 2.11.0); for details, enable `:setting -deprecation' or `:replay -deprecation'
res0: $r.global.noSelfType.type = private val _ = _
scala> val tp = ArrayClass[scala.util.Random] // magic with tags
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
tp: $r.global.Type = Array[scala.util.Random]
scala> tp.memberType(Array_apply) // evidence
diff --git a/test/files/run/repl-power.check b/test/files/run/repl-power.check
index a76db3dbc2..08f614eb60 100644
--- a/test/files/run/repl-power.check
+++ b/test/files/run/repl-power.check
@@ -7,11 +7,11 @@ Try :help or completions for vals._ and power._
scala> // guarding against "error: reference to global is ambiguous"
scala> global.emptyValDef // "it is imported twice in the same scope by ..."
-warning: there was one deprecation warning (since 2.11.0); re-run with -deprecation for details
+warning: there was one deprecation warning (since 2.11.0); for details, enable `:setting -deprecation' or `:replay -deprecation'
res0: $r.global.noSelfType.type = private val _ = _
scala> val tp = ArrayClass[scala.util.Random] // magic with tags
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
tp: $r.global.Type = Array[scala.util.Random]
scala> tp.memberType(Array_apply) // evidence
diff --git a/test/files/run/runtime.scala b/test/files/run/runtime.scala
index 89348b294d..468a80fc0c 100644
--- a/test/files/run/runtime.scala
+++ b/test/files/run/runtime.scala
@@ -73,7 +73,7 @@ object Test1Test {
// {System.out.print(22); test1.bar}.System.out.println();
{Console.print(23); test1.bar.System}.out.println();
{Console.print(24); test1.bar.System.out}.println();
- {Console.print(25); test1.bar.System.out.println:(() => Unit)} apply ();
+ {Console.print(25); test1.bar.System.out.println _ : (() => Unit)} apply ();
{Console.print(26); test1.bar.System.out.println()};
}
diff --git a/test/files/run/synchronized.scala b/test/files/run/synchronized.scala
index 6be0d64dd8..d777b85b2c 100644
--- a/test/files/run/synchronized.scala
+++ b/test/files/run/synchronized.scala
@@ -1,5 +1,5 @@
/*
- * filter: inliner warnings; re-run with
+ * filter: inliner warnings;
*/
import java.lang.Thread.holdsLock
import scala.collection.mutable.StringBuilder
diff --git a/test/files/run/t4172.check b/test/files/run/t4172.check
index 3141647dba..99e420678c 100644
--- a/test/files/run/t4172.check
+++ b/test/files/run/t4172.check
@@ -1,6 +1,6 @@
scala> val c = { class C { override def toString = "C" }; ((new C, new C { def f = 2 })) }
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
c: (C, C{def f: Int}) forSome { type C <: AnyRef } = (C,C)
scala> :quit
diff --git a/test/files/run/t4594-repl-settings.scala b/test/files/run/t4594-repl-settings.scala
index 524ec28843..587bb2312b 100644
--- a/test/files/run/t4594-repl-settings.scala
+++ b/test/files/run/t4594-repl-settings.scala
@@ -9,7 +9,7 @@ object Test extends SessionTest {
|depp: String
|
|scala> def a = depp
- |warning: there was one deprecation warning (since Time began.); re-run with -deprecation for details
+ |warning: there was one deprecation warning (since Time began.); for details, enable `:setting -deprecation' or `:replay -deprecation'
|a: String
|
|scala> :settings -deprecation
diff --git a/test/files/run/t4710.check b/test/files/run/t4710.check
index 5f90c68ed1..4a5d11f185 100644
--- a/test/files/run/t4710.check
+++ b/test/files/run/t4710.check
@@ -1,6 +1,6 @@
scala> def method : String = { implicit def f(s: Symbol) = "" ; 'symbol }
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
method: String
scala> :quit
diff --git a/test/files/run/t6329_repl.check b/test/files/run/t6329_repl.check
index 86cd984e11..22882a3597 100644
--- a/test/files/run/t6329_repl.check
+++ b/test/files/run/t6329_repl.check
@@ -3,28 +3,28 @@ scala> import scala.reflect.classTag
import scala.reflect.classTag
scala> classManifest[scala.List[_]]
-warning: there was one deprecation warning (since 2.10.0); re-run with -deprecation for details
+warning: there was one deprecation warning (since 2.10.0); for details, enable `:setting -deprecation' or `:replay -deprecation'
res0: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List[<?>]
scala> classTag[scala.List[_]]
res1: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List
scala> classManifest[scala.collection.immutable.List[_]]
-warning: there was one deprecation warning (since 2.10.0); re-run with -deprecation for details
+warning: there was one deprecation warning (since 2.10.0); for details, enable `:setting -deprecation' or `:replay -deprecation'
res2: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List[<?>]
scala> classTag[scala.collection.immutable.List[_]]
res3: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List
scala> classManifest[Predef.Set[_]]
-warning: there was one deprecation warning (since 2.10.0); re-run with -deprecation for details
+warning: there was one deprecation warning (since 2.10.0); for details, enable `:setting -deprecation' or `:replay -deprecation'
res4: scala.reflect.ClassTag[scala.collection.immutable.Set[_]] = scala.collection.immutable.Set[<?>]
scala> classTag[Predef.Set[_]]
res5: scala.reflect.ClassTag[scala.collection.immutable.Set[_]] = scala.collection.immutable.Set
scala> classManifest[scala.collection.immutable.Set[_]]
-warning: there was one deprecation warning (since 2.10.0); re-run with -deprecation for details
+warning: there was one deprecation warning (since 2.10.0); for details, enable `:setting -deprecation' or `:replay -deprecation'
res6: scala.reflect.ClassTag[scala.collection.immutable.Set[_]] = scala.collection.immutable.Set[<?>]
scala> classTag[scala.collection.immutable.Set[_]]
diff --git a/test/files/run/t6329_repl_bug.check b/test/files/run/t6329_repl_bug.check
index 6476fa71fc..11decae9bd 100644
--- a/test/files/run/t6329_repl_bug.check
+++ b/test/files/run/t6329_repl_bug.check
@@ -6,7 +6,7 @@ scala> import scala.reflect.runtime._
import scala.reflect.runtime._
scala> classManifest[List[_]]
-warning: there was one deprecation warning (since 2.10.0); re-run with -deprecation for details
+warning: there was one deprecation warning (since 2.10.0); for details, enable `:setting -deprecation' or `:replay -deprecation'
res0: scala.reflect.ClassTag[List[_]] = scala.collection.immutable.List[<?>]
scala> scala.reflect.classTag[List[_]]
diff --git a/test/files/run/t7319.check b/test/files/run/t7319.check
index 31923e7119..1dcb84c804 100644
--- a/test/files/run/t7319.check
+++ b/test/files/run/t7319.check
@@ -3,15 +3,15 @@ scala> class M[A]
defined class M
scala> implicit def ma0[A](a: A): M[A] = null
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
ma0: [A](a: A)M[A]
scala> implicit def ma1[A](a: A): M[A] = null
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
ma1: [A](a: A)M[A]
scala> def convert[F[X <: F[X]]](builder: F[_ <: F[_]]) = 0
-warning: there was one feature warning; re-run with -feature for details
+warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
convert: [F[X <: F[X]]](builder: F[_ <: F[_]])Int
scala> convert(Some[Int](0))