summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/abstract-inaccessible.check10
-rw-r--r--test/files/neg/ambiguous-float-dots.check23
-rw-r--r--test/files/neg/array-not-seq.check12
-rw-r--r--test/files/neg/catch-all.check10
-rw-r--r--test/files/neg/check-dead.check12
-rw-r--r--test/files/neg/checksensible.check202
-rw-r--r--test/files/neg/classmanifests_new_deprecations.check124
-rw-r--r--test/files/neg/exhausting.check16
-rw-r--r--test/files/neg/macro-deprecate-idents.check106
-rw-r--r--test/files/neg/main1.check14
-rw-r--r--test/files/neg/migration28.check4
-rw-r--r--test/files/neg/names-defaults-neg-warn.check8
-rw-r--r--test/files/neg/nullary-override.check4
-rw-r--r--test/files/neg/overloaded-implicit.check8
-rw-r--r--test/files/neg/package-ob-case.check4
-rw-r--r--test/files/neg/patmatexhaust.check24
-rw-r--r--test/files/neg/permanent-blindness.check10
-rw-r--r--test/files/neg/sealed-java-enums.check4
-rw-r--r--test/files/neg/stmt-expr-discard.check8
-rw-r--r--test/files/neg/switch.check8
-rw-r--r--test/files/neg/t2442.check8
-rw-r--r--test/files/neg/t2796.check4
-rw-r--r--test/files/neg/t3098.check4
-rw-r--r--test/files/neg/t3234.check6
-rw-r--r--test/files/neg/t3234.flags2
-rw-r--r--test/files/neg/t3683a.check4
-rw-r--r--test/files/neg/t4302.check4
-rw-r--r--test/files/neg/t4440.check12
-rw-r--r--test/files/neg/t4691_exhaust_extractor.check10
-rw-r--r--test/files/neg/t4749.check16
-rw-r--r--test/files/neg/t4762.check8
-rw-r--r--test/files/neg/t4851.check18
-rw-r--r--test/files/neg/t5426.check12
-rw-r--r--test/files/neg/t5663-badwarneq.check18
-rw-r--r--test/files/neg/t5830.check8
-rw-r--r--test/files/neg/t6011.check10
-rw-r--r--test/files/neg/t6048.check10
-rw-r--r--test/files/neg/unchecked-suppress.check10
-rw-r--r--test/files/neg/unchecked.check16
-rw-r--r--test/files/neg/unchecked2.check16
-rw-r--r--test/files/neg/unit-returns-value.check8
-rw-r--r--test/files/neg/virtpatmat_reach_null.check4
-rw-r--r--test/files/neg/virtpatmat_reach_sealed_unsealed.check12
-rw-r--r--test/files/neg/virtpatmat_unreach_select.check4
-rw-r--r--test/files/neg/warn-inferred-any.check10
45 files changed, 472 insertions, 373 deletions
diff --git a/test/files/neg/abstract-inaccessible.check b/test/files/neg/abstract-inaccessible.check
index 42b98ac026..d56f5691be 100644
--- a/test/files/neg/abstract-inaccessible.check
+++ b/test/files/neg/abstract-inaccessible.check
@@ -1,13 +1,15 @@
-abstract-inaccessible.scala:5: error: method implementMe in trait YourTrait references private[foo] trait Bippy.
+abstract-inaccessible.scala:5: warning: method implementMe in trait YourTrait references private[foo] trait Bippy.
Classes which cannot access Bippy may be unable to provide a concrete implementation of implementMe.
def implementMe(f: Int => (String, Bippy)): Unit
^
-abstract-inaccessible.scala:6: error: method overrideMe in trait YourTrait references private[foo] trait Bippy.
+abstract-inaccessible.scala:6: warning: method overrideMe in trait YourTrait references private[foo] trait Bippy.
Classes which cannot access Bippy may be unable to override overrideMe.
def overrideMe[T <: Bippy](x: T): T = x
^
-abstract-inaccessible.scala:7: error: method overrideMeAlso in trait YourTrait references private[foo] trait Bippy.
+abstract-inaccessible.scala:7: warning: method overrideMeAlso in trait YourTrait references private[foo] trait Bippy.
Classes which cannot access Bippy may be unable to override overrideMeAlso.
def overrideMeAlso(x: Map[Int, Set[Bippy]]) = 5
^
-three errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found
diff --git a/test/files/neg/ambiguous-float-dots.check b/test/files/neg/ambiguous-float-dots.check
index 6c21056d7a..cdd2d6fa2a 100644
--- a/test/files/neg/ambiguous-float-dots.check
+++ b/test/files/neg/ambiguous-float-dots.check
@@ -1,16 +1,27 @@
-ambiguous-float-dots.scala:2: error: This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit.
+ambiguous-float-dots.scala:2: warning: This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit.
val x0 = 5.
^
-ambiguous-float-dots.scala:6: error: This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit.
+ambiguous-float-dots.scala:6: warning: This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit.
val x1 = 5.f
^
-ambiguous-float-dots.scala:7: error: Treating numbers with a leading zero as octal is deprecated.
+ambiguous-float-dots.scala:7: warning: Treating numbers with a leading zero as octal is deprecated.
val y0 = 055
^
-ambiguous-float-dots.scala:11: error: This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit.
+ambiguous-float-dots.scala:11: warning: This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit.
1.+(2)
^
-ambiguous-float-dots.scala:12: error: This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit.
+ambiguous-float-dots.scala:12: warning: This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit.
1. + 2
^
-5 errors found
+ambiguous-float-dots.scala:11: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 1.+(2)
+ ^
+ambiguous-float-dots.scala:12: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 1. + 2
+ ^
+ambiguous-float-dots.scala:13: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 1 + 2
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+8 warnings found
+one error found
diff --git a/test/files/neg/array-not-seq.check b/test/files/neg/array-not-seq.check
index a3a639e772..6cfaa06efb 100644
--- a/test/files/neg/array-not-seq.check
+++ b/test/files/neg/array-not-seq.check
@@ -1,13 +1,15 @@
-array-not-seq.scala:2: error: An Array will no longer match as Seq[_].
+array-not-seq.scala:2: warning: An Array will no longer match as Seq[_].
def f1(x: Any) = x.isInstanceOf[Seq[_]]
^
-array-not-seq.scala:4: error: An Array will no longer match as Seq[_].
+array-not-seq.scala:4: warning: An Array will no longer match as Seq[_].
case _: Seq[_] => true
^
-array-not-seq.scala:16: error: An Array will no longer match as Seq[_].
+array-not-seq.scala:16: warning: An Array will no longer match as Seq[_].
case (Some(_: Seq[_]), Nil, _) => 1
^
-array-not-seq.scala:17: error: An Array will no longer match as Seq[_].
+array-not-seq.scala:17: warning: An Array will no longer match as Seq[_].
case (None, List(_: List[_], _), _) => 2
^
-four errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+four warnings found
+one error found
diff --git a/test/files/neg/catch-all.check b/test/files/neg/catch-all.check
index a9cd0ba927..d59e826f03 100644
--- a/test/files/neg/catch-all.check
+++ b/test/files/neg/catch-all.check
@@ -1,10 +1,12 @@
-catch-all.scala:2: error: This catches all Throwables. If this is really intended, use `case _: Throwable` to clear this warning.
+catch-all.scala:2: warning: This catches all Throwables. If this is really intended, use `case _: Throwable` to clear this warning.
try { "warn" } catch { case _ => }
^
-catch-all.scala:4: error: This catches all Throwables. If this is really intended, use `case x: Throwable` to clear this warning.
+catch-all.scala:4: warning: This catches all Throwables. If this is really intended, use `case x: Throwable` to clear this warning.
try { "warn" } catch { case x => }
^
-catch-all.scala:6: error: This catches all Throwables. If this is really intended, use `case x: Throwable` to clear this warning.
+catch-all.scala:6: warning: This catches all Throwables. If this is really intended, use `case x: Throwable` to clear this warning.
try { "warn" } catch { case _: RuntimeException => ; case x => }
^
-three errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found
diff --git a/test/files/neg/check-dead.check b/test/files/neg/check-dead.check
index 29601c1d4a..2150a942bf 100644
--- a/test/files/neg/check-dead.check
+++ b/test/files/neg/check-dead.check
@@ -1,13 +1,15 @@
-check-dead.scala:7: error: dead code following this construct
+check-dead.scala:7: warning: dead code following this construct
def z1 = y1(throw new Exception) // should warn
^
-check-dead.scala:10: error: dead code following this construct
+check-dead.scala:10: warning: dead code following this construct
def z2 = y2(throw new Exception) // should warn
^
-check-dead.scala:29: error: dead code following this construct
+check-dead.scala:29: warning: dead code following this construct
throw new Exception // should warn
^
-check-dead.scala:33: error: dead code following this construct
+check-dead.scala:33: warning: dead code following this construct
throw new Exception // should warn
^
-four errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+four warnings found
+one error found
diff --git a/test/files/neg/checksensible.check b/test/files/neg/checksensible.check
index 23af94180a..e5f1a38d96 100644
--- a/test/files/neg/checksensible.check
+++ b/test/files/neg/checksensible.check
@@ -1,100 +1,102 @@
-checksensible.scala:13: error: comparing a fresh object using `eq' will always yield false
- (new AnyRef) eq (new AnyRef)
- ^
-checksensible.scala:14: error: comparing a fresh object using `ne' will always yield true
- (new AnyRef) ne (new AnyRef)
- ^
-checksensible.scala:15: error: comparing a fresh object using `eq' will always yield false
- Shmoopie eq (new AnyRef)
- ^
-checksensible.scala:16: error: comparing a fresh object using `eq' will always yield false
- (Shmoopie: AnyRef) eq (new AnyRef)
- ^
-checksensible.scala:17: error: comparing a fresh object using `eq' will always yield false
- (new AnyRef) eq Shmoopie
- ^
-checksensible.scala:18: error: comparing a fresh object using `eq' will always yield false
- (new AnyRef) eq null
- ^
-checksensible.scala:19: error: comparing a fresh object using `eq' will always yield false
- null eq new AnyRef
- ^
-checksensible.scala:26: error: comparing values of types Unit and Int using `==' will always yield false
- (c = 1) == 0
- ^
-checksensible.scala:27: error: comparing values of types Int and Unit using `==' will always yield false
- 0 == (c = 1)
- ^
-checksensible.scala:29: error: comparing values of types Int and String using `==' will always yield false
- 1 == "abc"
- ^
-checksensible.scala:33: error: comparing values of types Some[Int] and Int using `==' will always yield false
- Some(1) == 1 // as above
- ^
-checksensible.scala:38: error: comparing a fresh object using `==' will always yield false
- new AnyRef == 1
- ^
-checksensible.scala:41: error: comparing values of types Int and Boolean using `==' will always yield false
- 1 == (new java.lang.Boolean(true))
- ^
-checksensible.scala:43: error: comparing values of types Int and Boolean using `!=' will always yield true
- 1 != true
- ^
-checksensible.scala:44: error: comparing values of types Unit and Boolean using `==' will always yield false
- () == true
- ^
-checksensible.scala:45: error: comparing values of types Unit and Unit using `==' will always yield true
- () == ()
- ^
-checksensible.scala:46: error: comparing values of types Unit and Unit using `==' will always yield true
- () == println
- ^
-checksensible.scala:47: error: comparing values of types Unit and scala.runtime.BoxedUnit using `==' will always yield true
- () == scala.runtime.BoxedUnit.UNIT // these should warn for always being true/false
- ^
-checksensible.scala:48: error: comparing values of types scala.runtime.BoxedUnit and Unit using `!=' will always yield false
- scala.runtime.BoxedUnit.UNIT != ()
- ^
-checksensible.scala:51: error: comparing values of types Int and Unit using `!=' will always yield true
- (1 != println)
- ^
-checksensible.scala:52: error: comparing values of types Int and Symbol using `!=' will always yield true
- (1 != 'sym)
- ^
-checksensible.scala:58: error: comparing a fresh object using `==' will always yield false
- ((x: Int) => x + 1) == null
- ^
-checksensible.scala:59: error: comparing a fresh object using `==' will always yield false
- Bep == ((_: Int) + 1)
- ^
-checksensible.scala:61: error: comparing a fresh object using `==' will always yield false
- new Object == new Object
- ^
-checksensible.scala:62: error: comparing a fresh object using `==' will always yield false
- new Object == "abc"
- ^
-checksensible.scala:63: error: comparing a fresh object using `!=' will always yield true
- new Exception() != new Exception()
- ^
-checksensible.scala:66: error: comparing values of types Int and Null using `==' will always yield false
- if (foo.length == null) "plante" else "plante pas"
- ^
-checksensible.scala:71: error: comparing values of types Bip and Bop using `==' will always yield false
- (x1 == x2)
- ^
-checksensible.scala:81: error: comparing values of types EqEqRefTest.this.C3 and EqEqRefTest.this.Z1 using `==' will always yield false
- c3 == z1
- ^
-checksensible.scala:82: error: comparing values of types EqEqRefTest.this.Z1 and EqEqRefTest.this.C3 using `==' will always yield false
- z1 == c3
- ^
-checksensible.scala:83: error: comparing values of types EqEqRefTest.this.Z1 and EqEqRefTest.this.C3 using `!=' will always yield true
- z1 != c3
- ^
-checksensible.scala:84: error: comparing values of types EqEqRefTest.this.C3 and String using `!=' will always yield true
- c3 != "abc"
- ^
-checksensible.scala:95: error: comparing values of types Unit and Int using `!=' will always yield true
- while ((c = in.read) != -1)
- ^
-33 errors found
+checksensible.scala:13: warning: comparing a fresh object using `eq' will always yield false
+ (new AnyRef) eq (new AnyRef)
+ ^
+checksensible.scala:14: warning: comparing a fresh object using `ne' will always yield true
+ (new AnyRef) ne (new AnyRef)
+ ^
+checksensible.scala:15: warning: comparing a fresh object using `eq' will always yield false
+ Shmoopie eq (new AnyRef)
+ ^
+checksensible.scala:16: warning: comparing a fresh object using `eq' will always yield false
+ (Shmoopie: AnyRef) eq (new AnyRef)
+ ^
+checksensible.scala:17: warning: comparing a fresh object using `eq' will always yield false
+ (new AnyRef) eq Shmoopie
+ ^
+checksensible.scala:18: warning: comparing a fresh object using `eq' will always yield false
+ (new AnyRef) eq null
+ ^
+checksensible.scala:19: warning: comparing a fresh object using `eq' will always yield false
+ null eq new AnyRef
+ ^
+checksensible.scala:26: warning: comparing values of types Unit and Int using `==' will always yield false
+ (c = 1) == 0
+ ^
+checksensible.scala:27: warning: comparing values of types Int and Unit using `==' will always yield false
+ 0 == (c = 1)
+ ^
+checksensible.scala:29: warning: comparing values of types Int and String using `==' will always yield false
+ 1 == "abc"
+ ^
+checksensible.scala:33: warning: comparing values of types Some[Int] and Int using `==' will always yield false
+ Some(1) == 1 // as above
+ ^
+checksensible.scala:38: warning: comparing a fresh object using `==' will always yield false
+ new AnyRef == 1
+ ^
+checksensible.scala:41: warning: comparing values of types Int and Boolean using `==' will always yield false
+ 1 == (new java.lang.Boolean(true))
+ ^
+checksensible.scala:43: warning: comparing values of types Int and Boolean using `!=' will always yield true
+ 1 != true
+ ^
+checksensible.scala:44: warning: comparing values of types Unit and Boolean using `==' will always yield false
+ () == true
+ ^
+checksensible.scala:45: warning: comparing values of types Unit and Unit using `==' will always yield true
+ () == ()
+ ^
+checksensible.scala:46: warning: comparing values of types Unit and Unit using `==' will always yield true
+ () == println
+ ^
+checksensible.scala:47: warning: comparing values of types Unit and scala.runtime.BoxedUnit using `==' will always yield true
+ () == scala.runtime.BoxedUnit.UNIT // these should warn for always being true/false
+ ^
+checksensible.scala:48: warning: comparing values of types scala.runtime.BoxedUnit and Unit using `!=' will always yield false
+ scala.runtime.BoxedUnit.UNIT != ()
+ ^
+checksensible.scala:51: warning: comparing values of types Int and Unit using `!=' will always yield true
+ (1 != println)
+ ^
+checksensible.scala:52: warning: comparing values of types Int and Symbol using `!=' will always yield true
+ (1 != 'sym)
+ ^
+checksensible.scala:58: warning: comparing a fresh object using `==' will always yield false
+ ((x: Int) => x + 1) == null
+ ^
+checksensible.scala:59: warning: comparing a fresh object using `==' will always yield false
+ Bep == ((_: Int) + 1)
+ ^
+checksensible.scala:61: warning: comparing a fresh object using `==' will always yield false
+ new Object == new Object
+ ^
+checksensible.scala:62: warning: comparing a fresh object using `==' will always yield false
+ new Object == "abc"
+ ^
+checksensible.scala:63: warning: comparing a fresh object using `!=' will always yield true
+ new Exception() != new Exception()
+ ^
+checksensible.scala:66: warning: comparing values of types Int and Null using `==' will always yield false
+ if (foo.length == null) "plante" else "plante pas"
+ ^
+checksensible.scala:71: warning: comparing values of types Bip and Bop using `==' will always yield false
+ (x1 == x2)
+ ^
+checksensible.scala:81: warning: comparing values of types EqEqRefTest.this.C3 and EqEqRefTest.this.Z1 using `==' will always yield false
+ c3 == z1
+ ^
+checksensible.scala:82: warning: comparing values of types EqEqRefTest.this.Z1 and EqEqRefTest.this.C3 using `==' will always yield false
+ z1 == c3
+ ^
+checksensible.scala:83: warning: comparing values of types EqEqRefTest.this.Z1 and EqEqRefTest.this.C3 using `!=' will always yield true
+ z1 != c3
+ ^
+checksensible.scala:84: warning: comparing values of types EqEqRefTest.this.C3 and String using `!=' will always yield true
+ c3 != "abc"
+ ^
+checksensible.scala:95: warning: comparing values of types Unit and Int using `!=' will always yield true
+ while ((c = in.read) != -1)
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+33 warnings found
+one error found
diff --git a/test/files/neg/classmanifests_new_deprecations.check b/test/files/neg/classmanifests_new_deprecations.check
index 841e893249..2301947b04 100644
--- a/test/files/neg/classmanifests_new_deprecations.check
+++ b/test/files/neg/classmanifests_new_deprecations.check
@@ -1,61 +1,63 @@
-classmanifests_new_deprecations.scala:2: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- def cm1[T: ClassManifest] = ???
- ^
-classmanifests_new_deprecations.scala:3: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- def cm2[T](implicit evidence$1: ClassManifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:4: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- val cm3: ClassManifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:4: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- val cm3: ClassManifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:6: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- def rcm1[T: scala.reflect.ClassManifest] = ???
- ^
-classmanifests_new_deprecations.scala:7: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- def rcm2[T](implicit evidence$1: scala.reflect.ClassManifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:8: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- val rcm3: scala.reflect.ClassManifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:8: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- val rcm3: scala.reflect.ClassManifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:10: error: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
- type CM[T] = ClassManifest[T]
- ^
-classmanifests_new_deprecations.scala:15: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
- type RCM[T] = scala.reflect.ClassManifest[T]
- ^
-classmanifests_new_deprecations.scala:20: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def m1[T: Manifest] = ???
- ^
-classmanifests_new_deprecations.scala:21: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def m2[T](implicit evidence$1: Manifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:22: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val m3: Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:22: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val m3: Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:24: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def rm1[T: scala.reflect.Manifest] = ???
- ^
-classmanifests_new_deprecations.scala:25: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def rm2[T](implicit evidence$1: scala.reflect.Manifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:26: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val rm3: scala.reflect.Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:26: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val rm3: scala.reflect.Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:28: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- type M[T] = Manifest[T]
- ^
-classmanifests_new_deprecations.scala:33: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- type RM[T] = scala.reflect.Manifest[T]
- ^
-20 errors found
+classmanifests_new_deprecations.scala:2: warning: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ def cm1[T: ClassManifest] = ???
+ ^
+classmanifests_new_deprecations.scala:3: warning: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ def cm2[T](implicit evidence$1: ClassManifest[T]) = ???
+ ^
+classmanifests_new_deprecations.scala:4: warning: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ val cm3: ClassManifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:4: warning: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ val cm3: ClassManifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:6: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ def rcm1[T: scala.reflect.ClassManifest] = ???
+ ^
+classmanifests_new_deprecations.scala:7: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ def rcm2[T](implicit evidence$1: scala.reflect.ClassManifest[T]) = ???
+ ^
+classmanifests_new_deprecations.scala:8: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ val rcm3: scala.reflect.ClassManifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:8: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ val rcm3: scala.reflect.ClassManifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:10: warning: type ClassManifest in object Predef is deprecated: Use scala.reflect.ClassTag instead
+ type CM[T] = ClassManifest[T]
+ ^
+classmanifests_new_deprecations.scala:15: warning: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
+ type RCM[T] = scala.reflect.ClassManifest[T]
+ ^
+classmanifests_new_deprecations.scala:20: warning: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ def m1[T: Manifest] = ???
+ ^
+classmanifests_new_deprecations.scala:21: warning: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ def m2[T](implicit evidence$1: Manifest[T]) = ???
+ ^
+classmanifests_new_deprecations.scala:22: warning: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ val m3: Manifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:22: warning: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ val m3: Manifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:24: warning: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ def rm1[T: scala.reflect.Manifest] = ???
+ ^
+classmanifests_new_deprecations.scala:25: warning: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ def rm2[T](implicit evidence$1: scala.reflect.Manifest[T]) = ???
+ ^
+classmanifests_new_deprecations.scala:26: warning: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ val rm3: scala.reflect.Manifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:26: warning: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ val rm3: scala.reflect.Manifest[Int] = null
+ ^
+classmanifests_new_deprecations.scala:28: warning: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ type M[T] = Manifest[T]
+ ^
+classmanifests_new_deprecations.scala:33: warning: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
+ type RM[T] = scala.reflect.Manifest[T]
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+20 warnings found
+one error found
diff --git a/test/files/neg/exhausting.check b/test/files/neg/exhausting.check
index 0f0d13cb33..c573eb3e15 100644
--- a/test/files/neg/exhausting.check
+++ b/test/files/neg/exhausting.check
@@ -1,25 +1,27 @@
-exhausting.scala:21: error: match may not be exhaustive.
+exhausting.scala:21: warning: match may not be exhaustive.
It would fail on the following input: List(_, _, _)
def fail1[T](xs: List[T]) = xs match {
^
-exhausting.scala:27: error: match may not be exhaustive.
+exhausting.scala:27: warning: match may not be exhaustive.
It would fail on the following input: Nil
def fail2[T](xs: List[T]) = xs match {
^
-exhausting.scala:32: error: match may not be exhaustive.
+exhausting.scala:32: warning: match may not be exhaustive.
It would fail on the following input: List((x: Int forSome x not in (1, 2)))
def fail3a(xs: List[Int]) = xs match {
^
-exhausting.scala:39: error: match may not be exhaustive.
+exhausting.scala:39: warning: match may not be exhaustive.
It would fail on the following input: Bar3
def fail3[T](x: Foo[T]) = x match {
^
-exhausting.scala:47: error: match may not be exhaustive.
+exhausting.scala:47: warning: match may not be exhaustive.
It would fail on the following inputs: (Bar1, Bar2), (Bar1, Bar3), (Bar2, Bar1), (Bar2, Bar2)
def fail4[T <: AnyRef](xx: (Foo[T], Foo[T])) = xx match {
^
-exhausting.scala:56: error: match may not be exhaustive.
+exhausting.scala:56: warning: match may not be exhaustive.
It would fail on the following inputs: (Bar1, Bar2), (Bar1, Bar3), (Bar2, Bar1), (Bar2, Bar2)
def fail5[T](xx: (Foo[T], Foo[T])) = xx match {
^
-6 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+6 warnings found
+one error found
diff --git a/test/files/neg/macro-deprecate-idents.check b/test/files/neg/macro-deprecate-idents.check
index f8a7e519df..c653eabaef 100644
--- a/test/files/neg/macro-deprecate-idents.check
+++ b/test/files/neg/macro-deprecate-idents.check
@@ -1,52 +1,54 @@
-macro-deprecate-idents.scala:2: error: macro is now a reserved word; usage as an identifier is deprecated
- val macro = ???
- ^
-macro-deprecate-idents.scala:6: error: macro is now a reserved word; usage as an identifier is deprecated
- var macro = ???
- ^
-macro-deprecate-idents.scala:10: error: macro is now a reserved word; usage as an identifier is deprecated
- type macro = Int
- ^
-macro-deprecate-idents.scala:14: error: macro is now a reserved word; usage as an identifier is deprecated
- class macro
- ^
-macro-deprecate-idents.scala:18: error: macro is now a reserved word; usage as an identifier is deprecated
- class macro
- ^
-macro-deprecate-idents.scala:22: error: macro is now a reserved word; usage as an identifier is deprecated
- object macro
- ^
-macro-deprecate-idents.scala:26: error: macro is now a reserved word; usage as an identifier is deprecated
- object macro
- ^
-macro-deprecate-idents.scala:30: error: macro is now a reserved word; usage as an identifier is deprecated
- trait macro
- ^
-macro-deprecate-idents.scala:34: error: macro is now a reserved word; usage as an identifier is deprecated
- trait macro
- ^
-macro-deprecate-idents.scala:37: error: macro is now a reserved word; usage as an identifier is deprecated
-package macro {
- ^
-macro-deprecate-idents.scala:38: error: macro is now a reserved word; usage as an identifier is deprecated
- package macro.bar {
- ^
-macro-deprecate-idents.scala:43: error: macro is now a reserved word; usage as an identifier is deprecated
- package macro.foo {
- ^
-macro-deprecate-idents.scala:48: error: macro is now a reserved word; usage as an identifier is deprecated
- val Some(macro) = Some(42)
- ^
-macro-deprecate-idents.scala:49: error: macro is now a reserved word; usage as an identifier is deprecated
- macro match {
- ^
-macro-deprecate-idents.scala:50: error: macro is now a reserved word; usage as an identifier is deprecated
- case macro => println(macro)
- ^
-macro-deprecate-idents.scala:50: error: macro is now a reserved word; usage as an identifier is deprecated
- case macro => println(macro)
- ^
-macro-deprecate-idents.scala:55: error: macro is now a reserved word; usage as an identifier is deprecated
- def macro = 2
- ^
-17 errors found
+macro-deprecate-idents.scala:2: warning: macro is now a reserved word; usage as an identifier is deprecated
+ val macro = ???
+ ^
+macro-deprecate-idents.scala:6: warning: macro is now a reserved word; usage as an identifier is deprecated
+ var macro = ???
+ ^
+macro-deprecate-idents.scala:10: warning: macro is now a reserved word; usage as an identifier is deprecated
+ type macro = Int
+ ^
+macro-deprecate-idents.scala:14: warning: macro is now a reserved word; usage as an identifier is deprecated
+ class macro
+ ^
+macro-deprecate-idents.scala:18: warning: macro is now a reserved word; usage as an identifier is deprecated
+ class macro
+ ^
+macro-deprecate-idents.scala:22: warning: macro is now a reserved word; usage as an identifier is deprecated
+ object macro
+ ^
+macro-deprecate-idents.scala:26: warning: macro is now a reserved word; usage as an identifier is deprecated
+ object macro
+ ^
+macro-deprecate-idents.scala:30: warning: macro is now a reserved word; usage as an identifier is deprecated
+ trait macro
+ ^
+macro-deprecate-idents.scala:34: warning: macro is now a reserved word; usage as an identifier is deprecated
+ trait macro
+ ^
+macro-deprecate-idents.scala:37: warning: macro is now a reserved word; usage as an identifier is deprecated
+package macro {
+ ^
+macro-deprecate-idents.scala:38: warning: macro is now a reserved word; usage as an identifier is deprecated
+ package macro.bar {
+ ^
+macro-deprecate-idents.scala:43: warning: macro is now a reserved word; usage as an identifier is deprecated
+ package macro.foo {
+ ^
+macro-deprecate-idents.scala:48: warning: macro is now a reserved word; usage as an identifier is deprecated
+ val Some(macro) = Some(42)
+ ^
+macro-deprecate-idents.scala:49: warning: macro is now a reserved word; usage as an identifier is deprecated
+ macro match {
+ ^
+macro-deprecate-idents.scala:50: warning: macro is now a reserved word; usage as an identifier is deprecated
+ case macro => println(macro)
+ ^
+macro-deprecate-idents.scala:50: warning: macro is now a reserved word; usage as an identifier is deprecated
+ case macro => println(macro)
+ ^
+macro-deprecate-idents.scala:55: warning: macro is now a reserved word; usage as an identifier is deprecated
+ def macro = 2
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+17 warnings found
+one error found
diff --git a/test/files/neg/main1.check b/test/files/neg/main1.check
index 1a7a13e1e9..b745105818 100644
--- a/test/files/neg/main1.check
+++ b/test/files/neg/main1.check
@@ -1,26 +1,28 @@
-main1.scala:3: error: Foo has a main method with parameter type Array[String], but foo1.Foo will not be a runnable program.
+main1.scala:3: warning: Foo has a main method with parameter type Array[String], but foo1.Foo will not be a runnable program.
Reason: companion is a trait, which means no static forwarder can be generated.
object Foo { // companion is trait
^
-main1.scala:10: error: Foo has a main method with parameter type Array[String], but foo2.Foo will not be a runnable program.
+main1.scala:10: warning: Foo has a main method with parameter type Array[String], but foo2.Foo will not be a runnable program.
Reason: companion contains its own main method, which means no static forwarder can be generated.
object Foo { // companion has its own main
^
-main1.scala:22: error: Foo has a main method with parameter type Array[String], but foo3.Foo will not be a runnable program.
+main1.scala:22: warning: Foo has a main method with parameter type Array[String], but foo3.Foo will not be a runnable program.
Reason: companion contains its own main method (implementation restriction: no main is allowed, regardless of signature), which means no static forwarder can be generated.
object Foo { // Companion contains main, but not an interfering main.
^
-main1.scala:31: error: Foo has a main method with parameter type Array[String], but foo4.Foo will not be a runnable program.
+main1.scala:31: warning: Foo has a main method with parameter type Array[String], but foo4.Foo will not be a runnable program.
Reason: companion contains its own main method, which means no static forwarder can be generated.
object Foo extends Foo { // Inherits main from the class
^
-main1.scala:39: error: Foo has a main method with parameter type Array[String], but foo5.Foo will not be a runnable program.
+main1.scala:39: warning: Foo has a main method with parameter type Array[String], but foo5.Foo will not be a runnable program.
Reason: companion contains its own main method, which means no static forwarder can be generated.
object Foo extends Foo { // Overrides main from the class
^
-5 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+5 warnings found
+one error found
diff --git a/test/files/neg/migration28.check b/test/files/neg/migration28.check
index d7dfacf3db..afb4db62e2 100644
--- a/test/files/neg/migration28.check
+++ b/test/files/neg/migration28.check
@@ -1,5 +1,7 @@
-migration28.scala:4: error: method scanRight in trait TraversableLike has changed semantics in version 2.9.0:
+migration28.scala:4: warning: method scanRight in trait TraversableLike has changed semantics in version 2.9.0:
The behavior of `scanRight` has changed. The previous behavior can be reproduced with scanRight.reverse.
List(1,2,3,4,5).scanRight(0)(_+_)
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/names-defaults-neg-warn.check b/test/files/neg/names-defaults-neg-warn.check
index e1085acf76..0f4edef84e 100644
--- a/test/files/neg/names-defaults-neg-warn.check
+++ b/test/files/neg/names-defaults-neg-warn.check
@@ -1,7 +1,9 @@
-names-defaults-neg-warn.scala:11: error: the parameter name s has been deprecated. Use x instead.
+names-defaults-neg-warn.scala:11: warning: the parameter name s has been deprecated. Use x instead.
deprNam2.f(s = "dlfkj")
^
-names-defaults-neg-warn.scala:12: error: the parameter name x has been deprecated. Use s instead.
+names-defaults-neg-warn.scala:12: warning: the parameter name x has been deprecated. Use s instead.
deprNam2.g(x = "dlkjf")
^
-two errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+two warnings found
+one error found
diff --git a/test/files/neg/nullary-override.check b/test/files/neg/nullary-override.check
index 6b2ded2d4a..f032f4a6c2 100644
--- a/test/files/neg/nullary-override.check
+++ b/test/files/neg/nullary-override.check
@@ -1,4 +1,6 @@
-nullary-override.scala:2: error: non-nullary method overrides nullary method
+nullary-override.scala:2: warning: non-nullary method overrides nullary method
class B extends A { override def x(): Int = 4 }
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/overloaded-implicit.check b/test/files/neg/overloaded-implicit.check
index bdbe6a89d5..ca0870705d 100644
--- a/test/files/neg/overloaded-implicit.check
+++ b/test/files/neg/overloaded-implicit.check
@@ -1,7 +1,9 @@
-overloaded-implicit.scala:2: error: parameterized overloaded implicit methods are not visible as view bounds
+overloaded-implicit.scala:2: warning: parameterized overloaded implicit methods are not visible as view bounds
implicit def imp1[T](x: List[T]): Map[T, T] = Map()
^
-overloaded-implicit.scala:3: error: parameterized overloaded implicit methods are not visible as view bounds
+overloaded-implicit.scala:3: warning: parameterized overloaded implicit methods are not visible as view bounds
implicit def imp1[T](x: Set[T]): Map[T, T] = Map()
^
-two errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+two warnings found
+one error found
diff --git a/test/files/neg/package-ob-case.check b/test/files/neg/package-ob-case.check
index e6b2f858ef..063a120db1 100644
--- a/test/files/neg/package-ob-case.check
+++ b/test/files/neg/package-ob-case.check
@@ -1,5 +1,7 @@
-package-ob-case.scala:3: error: it is not recommended to define classes/objects inside of package objects.
+package-ob-case.scala:3: warning: it is not recommended to define classes/objects inside of package objects.
If possible, define class X in package foo instead.
case class X(z: Int) { }
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/patmatexhaust.check b/test/files/neg/patmatexhaust.check
index 4556e6622f..6069dfdaab 100644
--- a/test/files/neg/patmatexhaust.check
+++ b/test/files/neg/patmatexhaust.check
@@ -1,40 +1,42 @@
-patmatexhaust.scala:7: error: match may not be exhaustive.
+patmatexhaust.scala:7: warning: match may not be exhaustive.
It would fail on the following input: Baz
def ma1(x:Foo) = x match {
^
-patmatexhaust.scala:11: error: match may not be exhaustive.
+patmatexhaust.scala:11: warning: match may not be exhaustive.
It would fail on the following input: Bar(_)
def ma2(x:Foo) = x match {
^
-patmatexhaust.scala:23: error: match may not be exhaustive.
+patmatexhaust.scala:23: warning: match may not be exhaustive.
It would fail on the following inputs: (Kult(_), Kult(_)), (Qult(), Qult())
def ma3(x:Mult) = (x,x) match { // not exhaustive
^
-patmatexhaust.scala:49: error: match may not be exhaustive.
+patmatexhaust.scala:49: warning: match may not be exhaustive.
It would fail on the following inputs: Gp(), Gu
def ma4(x:Deep) = x match { // missing cases: Gu, Gp
^
-patmatexhaust.scala:55: error: unreachable code
+patmatexhaust.scala:55: warning: unreachable code
case _ if 1 == 0 =>
^
-patmatexhaust.scala:53: error: match may not be exhaustive.
+patmatexhaust.scala:53: warning: match may not be exhaustive.
It would fail on the following input: Gp()
def ma5(x:Deep) = x match {
^
-patmatexhaust.scala:75: error: match may not be exhaustive.
+patmatexhaust.scala:75: warning: match may not be exhaustive.
It would fail on the following input: B()
def ma9(x: B) = x match {
^
-patmatexhaust.scala:100: error: match may not be exhaustive.
+patmatexhaust.scala:100: warning: match may not be exhaustive.
It would fail on the following input: C1()
def ma10(x: C) = x match { // not exhaustive: C1 is not sealed.
^
-patmatexhaust.scala:114: error: match may not be exhaustive.
+patmatexhaust.scala:114: warning: match may not be exhaustive.
It would fail on the following inputs: D1, D2()
def ma10(x: C) = x match { // not exhaustive: C1 has subclasses.
^
-patmatexhaust.scala:126: error: match may not be exhaustive.
+patmatexhaust.scala:126: warning: match may not be exhaustive.
It would fail on the following input: C1()
def ma10(x: C) = x match { // not exhaustive: C1 is not abstract.
^
-10 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+10 warnings found
+one error found
diff --git a/test/files/neg/permanent-blindness.check b/test/files/neg/permanent-blindness.check
index 18b4543707..cdde201ef6 100644
--- a/test/files/neg/permanent-blindness.check
+++ b/test/files/neg/permanent-blindness.check
@@ -1,10 +1,12 @@
-permanent-blindness.scala:10: error: imported `Bippy' is permanently hidden by definition of class Bippy in package bar
+permanent-blindness.scala:10: warning: imported `Bippy' is permanently hidden by definition of class Bippy in package bar
import foo.{ Bippy, Bop, Dingus }
^
-permanent-blindness.scala:10: error: imported `Bop' is permanently hidden by definition of object Bop in package bar
+permanent-blindness.scala:10: warning: imported `Bop' is permanently hidden by definition of object Bop in package bar
import foo.{ Bippy, Bop, Dingus }
^
-permanent-blindness.scala:10: error: imported `Dingus' is permanently hidden by definition of object Dingus in package bar
+permanent-blindness.scala:10: warning: imported `Dingus' is permanently hidden by definition of object Dingus in package bar
import foo.{ Bippy, Bop, Dingus }
^
-three errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found
diff --git a/test/files/neg/sealed-java-enums.check b/test/files/neg/sealed-java-enums.check
index 20d00c8e91..a3c39ec5cd 100644
--- a/test/files/neg/sealed-java-enums.check
+++ b/test/files/neg/sealed-java-enums.check
@@ -1,5 +1,7 @@
-sealed-java-enums.scala:5: error: match may not be exhaustive.
+sealed-java-enums.scala:5: warning: match may not be exhaustive.
It would fail on the following inputs: BLOCKED, TERMINATED, TIMED_WAITING
def f(state: State) = state match {
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/stmt-expr-discard.check b/test/files/neg/stmt-expr-discard.check
index 2d6420a61d..1207e6da50 100644
--- a/test/files/neg/stmt-expr-discard.check
+++ b/test/files/neg/stmt-expr-discard.check
@@ -1,7 +1,9 @@
-stmt-expr-discard.scala:3: error: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+stmt-expr-discard.scala:3: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ 2
^
-stmt-expr-discard.scala:4: error: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+stmt-expr-discard.scala:4: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
- 4
^
-two errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+two warnings found
+one error found
diff --git a/test/files/neg/switch.check b/test/files/neg/switch.check
index e4730b6459..f968d3a448 100644
--- a/test/files/neg/switch.check
+++ b/test/files/neg/switch.check
@@ -1,7 +1,9 @@
-switch.scala:38: error: could not emit switch for @switch annotated match
+switch.scala:38: warning: could not emit switch for @switch annotated match
def fail2(c: Char) = (c: @switch @unchecked) match {
^
-switch.scala:45: error: could not emit switch for @switch annotated match
+switch.scala:45: warning: could not emit switch for @switch annotated match
def fail3(c: Char) = (c: @unchecked @switch) match {
^
-two errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+two warnings found
+one error found
diff --git a/test/files/neg/t2442.check b/test/files/neg/t2442.check
index 714816fd62..9ff0b44661 100644
--- a/test/files/neg/t2442.check
+++ b/test/files/neg/t2442.check
@@ -1,9 +1,11 @@
-t2442.scala:4: error: match may not be exhaustive.
+t2442.scala:4: warning: match may not be exhaustive.
It would fail on the following input: THREE
def f(e: MyEnum) = e match {
^
-t2442.scala:11: error: match may not be exhaustive.
+t2442.scala:11: warning: match may not be exhaustive.
It would fail on the following input: BLUE
def g(e: MySecondEnum) = e match {
^
-two errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+two warnings found
+one error found
diff --git a/test/files/neg/t2796.check b/test/files/neg/t2796.check
index aeb18497ed..4456a7fc19 100644
--- a/test/files/neg/t2796.check
+++ b/test/files/neg/t2796.check
@@ -1,4 +1,6 @@
-t2796.scala:7: error: Implementation restriction: early definitions in traits are not initialized before the super class is initialized.
+t2796.scala:7: warning: Implementation restriction: early definitions in traits are not initialized before the super class is initialized.
val abstractVal = "T1.abstractVal" // warn
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/t3098.check b/test/files/neg/t3098.check
index 85829747b9..5343b128f0 100644
--- a/test/files/neg/t3098.check
+++ b/test/files/neg/t3098.check
@@ -1,5 +1,7 @@
-b.scala:3: error: match may not be exhaustive.
+b.scala:3: warning: match may not be exhaustive.
It would fail on the following input: (_ : C)
def f = (null: T) match {
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/t3234.check b/test/files/neg/t3234.check
index 477b021e5e..8f0d624ed9 100644
--- a/test/files/neg/t3234.check
+++ b/test/files/neg/t3234.check
@@ -1,2 +1,6 @@
-error: there were 1 inliner warnings; re-run with -Yinline-warnings for details
+t3234.scala:17: warning: At the end of the day, could not inline @inline-marked method foo3
+ println(foo(42) + foo2(11) + foo3(2))
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/t3234.flags b/test/files/neg/t3234.flags
index c9cefdc4b9..cc3d9fb6f0 100644
--- a/test/files/neg/t3234.flags
+++ b/test/files/neg/t3234.flags
@@ -1 +1 @@
--Yinline -Xfatal-warnings \ No newline at end of file
+-Yinline -Yinline-warnings -Xfatal-warnings
diff --git a/test/files/neg/t3683a.check b/test/files/neg/t3683a.check
index 3de3ad784e..6386265ebc 100644
--- a/test/files/neg/t3683a.check
+++ b/test/files/neg/t3683a.check
@@ -1,5 +1,7 @@
-t3683a.scala:14: error: match may not be exhaustive.
+t3683a.scala:14: warning: match may not be exhaustive.
It would fail on the following input: XX()
w match {
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/t4302.check b/test/files/neg/t4302.check
index 327425acb0..1a59b79a3b 100644
--- a/test/files/neg/t4302.check
+++ b/test/files/neg/t4302.check
@@ -1,4 +1,6 @@
-t4302.scala:2: error: abstract type T in type T is unchecked since it is eliminated by erasure
+t4302.scala:2: warning: abstract type T in type T is unchecked since it is eliminated by erasure
def hasMatch[T](x: AnyRef) = x.isInstanceOf[T]
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/t4440.check b/test/files/neg/t4440.check
index 2861dc3040..10e7188e32 100644
--- a/test/files/neg/t4440.check
+++ b/test/files/neg/t4440.check
@@ -1,13 +1,15 @@
-t4440.scala:12: error: The outer reference in this type test cannot be checked at run time.
+t4440.scala:12: warning: The outer reference in this type test cannot be checked at run time.
case _: b.Inner => println("b")
^
-t4440.scala:13: error: The outer reference in this type test cannot be checked at run time.
+t4440.scala:13: warning: The outer reference in this type test cannot be checked at run time.
case _: a.Inner => println("a") // this is the case we want
^
-t4440.scala:16: error: The outer reference in this type test cannot be checked at run time.
+t4440.scala:16: warning: The outer reference in this type test cannot be checked at run time.
case _: a.Inner => println("a")
^
-t4440.scala:17: error: The outer reference in this type test cannot be checked at run time.
+t4440.scala:17: warning: The outer reference in this type test cannot be checked at run time.
case _: b.Inner => println("b") // this is the case we want
^
-four errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+four warnings found
+one error found
diff --git a/test/files/neg/t4691_exhaust_extractor.check b/test/files/neg/t4691_exhaust_extractor.check
index cd12e56f86..6396944145 100644
--- a/test/files/neg/t4691_exhaust_extractor.check
+++ b/test/files/neg/t4691_exhaust_extractor.check
@@ -1,13 +1,15 @@
-t4691_exhaust_extractor.scala:17: error: match may not be exhaustive.
+t4691_exhaust_extractor.scala:17: warning: match may not be exhaustive.
It would fail on the following input: Bar3()
def f1(x: Foo) = x match {
^
-t4691_exhaust_extractor.scala:23: error: match may not be exhaustive.
+t4691_exhaust_extractor.scala:23: warning: match may not be exhaustive.
It would fail on the following input: Bar3()
def f2(x: Foo) = x match {
^
-t4691_exhaust_extractor.scala:29: error: match may not be exhaustive.
+t4691_exhaust_extractor.scala:29: warning: match may not be exhaustive.
It would fail on the following input: Bar3()
def f3(x: Foo) = x match {
^
-three errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found
diff --git a/test/files/neg/t4749.check b/test/files/neg/t4749.check
index 93ad3935fa..34eed6e433 100644
--- a/test/files/neg/t4749.check
+++ b/test/files/neg/t4749.check
@@ -1,28 +1,30 @@
-t4749.scala:2: error: Fail1 has a main method with parameter type Array[String], but bippy.Fail1 will not be a runnable program.
+t4749.scala:2: warning: Fail1 has a main method with parameter type Array[String], but bippy.Fail1 will not be a runnable program.
Reason: main method must have exact signature (Array[String])Unit
object Fail1 {
^
-t4749.scala:6: error: Fail2 has a main method with parameter type Array[String], but bippy.Fail2 will not be a runnable program.
+t4749.scala:6: warning: Fail2 has a main method with parameter type Array[String], but bippy.Fail2 will not be a runnable program.
Reason: main methods cannot be generic.
object Fail2 {
^
-t4749.scala:13: error: Fail3 has a main method with parameter type Array[String], but bippy.Fail3 will not be a runnable program.
+t4749.scala:13: warning: Fail3 has a main method with parameter type Array[String], but bippy.Fail3 will not be a runnable program.
Reason: main methods cannot refer to type parameters or abstract types.
object Fail3 extends Bippy[Unit] { }
^
-t4749.scala:16: error: Fail4 has a main method with parameter type Array[String], but bippy.Fail4 will not be a runnable program.
+t4749.scala:16: warning: Fail4 has a main method with parameter type Array[String], but bippy.Fail4 will not be a runnable program.
Reason: companion is a trait, which means no static forwarder can be generated.
object Fail4 {
^
-t4749.scala:21: error: Fail5 has a main method with parameter type Array[String], but bippy.Fail5 will not be a runnable program.
+t4749.scala:21: warning: Fail5 has a main method with parameter type Array[String], but bippy.Fail5 will not be a runnable program.
Reason: companion contains its own main method, which means no static forwarder can be generated.
object Fail5 extends Fail5 { }
^
-t4749.scala:26: error: Fail6 has a main method with parameter type Array[String], but bippy.Fail6 will not be a runnable program.
+t4749.scala:26: warning: Fail6 has a main method with parameter type Array[String], but bippy.Fail6 will not be a runnable program.
Reason: companion contains its own main method (implementation restriction: no main is allowed, regardless of signature), which means no static forwarder can be generated.
object Fail6 {
^
-6 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+6 warnings found
+one error found
diff --git a/test/files/neg/t4762.check b/test/files/neg/t4762.check
index 5e67f2022a..a0525f6226 100644
--- a/test/files/neg/t4762.check
+++ b/test/files/neg/t4762.check
@@ -1,7 +1,9 @@
-t4762.scala:15: error: private[this] value x in class B shadows mutable x inherited from class A. Changes to x will not be visible within class B - you may want to give them distinct names.
+t4762.scala:15: warning: private[this] value x in class B shadows mutable x inherited from class A. Changes to x will not be visible within class B - you may want to give them distinct names.
/* (99,99) */ (this.x, this.y),
^
-t4762.scala:48: error: private[this] value x in class Derived shadows mutable x inherited from class Base. Changes to x will not be visible within class Derived - you may want to give them distinct names.
+t4762.scala:48: warning: private[this] value x in class Derived shadows mutable x inherited from class Base. Changes to x will not be visible within class Derived - you may want to give them distinct names.
class Derived( x : Int ) extends Base( x ) { override def toString = x.toString }
^
-two errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+two warnings found
+one error found
diff --git a/test/files/neg/t4851.check b/test/files/neg/t4851.check
index 8011350f23..0fd66b9efe 100644
--- a/test/files/neg/t4851.check
+++ b/test/files/neg/t4851.check
@@ -1,43 +1,45 @@
-S.scala:2: error: Adapting argument list by inserting (): leaky (Object-receiving) target makes this especially dangerous.
+S.scala:2: warning: Adapting argument list by inserting (): leaky (Object-receiving) target makes this especially dangerous.
signature: J(x: Any): J
given arguments: <none>
after adaptation: new J((): Unit)
val x1 = new J
^
-S.scala:3: error: Adapting argument list by inserting (): leaky (Object-receiving) target makes this especially dangerous.
+S.scala:3: warning: Adapting argument list by inserting (): leaky (Object-receiving) target makes this especially dangerous.
signature: J(x: Any): J
given arguments: <none>
after adaptation: new J((): Unit)
val x2 = new J()
^
-S.scala:4: error: Adapting argument list by creating a 5-tuple: this may not be what you want.
+S.scala:4: warning: Adapting argument list by creating a 5-tuple: this may not be what you want.
signature: J(x: Any): J
given arguments: 1, 2, 3, 4, 5
after adaptation: new J((1, 2, 3, 4, 5): (Int, Int, Int, Int, Int))
val x3 = new J(1, 2, 3, 4, 5)
^
-S.scala:6: error: Adapting argument list by creating a 3-tuple: this may not be what you want.
+S.scala:6: warning: Adapting argument list by creating a 3-tuple: this may not be what you want.
signature: Some.apply[A](x: A): Some[A]
given arguments: 1, 2, 3
after adaptation: Some((1, 2, 3): (Int, Int, Int))
val y1 = Some(1, 2, 3)
^
-S.scala:7: error: Adapting argument list by creating a 3-tuple: this may not be what you want.
+S.scala:7: warning: Adapting argument list by creating a 3-tuple: this may not be what you want.
signature: Some(x: A): Some[A]
given arguments: 1, 2, 3
after adaptation: new Some((1, 2, 3): (Int, Int, Int))
val y2 = new Some(1, 2, 3)
^
-S.scala:9: error: Adapting argument list by inserting (): this is unlikely to be what you want.
+S.scala:9: warning: Adapting argument list by inserting (): this is unlikely to be what you want.
signature: J2[T](x: T): J2[T]
given arguments: <none>
after adaptation: new J2((): Unit)
val z1 = new J2
^
-S.scala:10: error: Adapting argument list by inserting (): this is unlikely to be what you want.
+S.scala:10: warning: Adapting argument list by inserting (): this is unlikely to be what you want.
signature: J2[T](x: T): J2[T]
given arguments: <none>
after adaptation: new J2((): Unit)
val z2 = new J2()
^
-7 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+7 warnings found
+one error found
diff --git a/test/files/neg/t5426.check b/test/files/neg/t5426.check
index d9e192d3f0..98f3ddaaae 100644
--- a/test/files/neg/t5426.check
+++ b/test/files/neg/t5426.check
@@ -1,13 +1,15 @@
-t5426.scala:2: error: comparing values of types Some[Int] and Int using `==' will always yield false
+t5426.scala:2: warning: comparing values of types Some[Int] and Int using `==' will always yield false
def f1 = Some(5) == 5
^
-t5426.scala:3: error: comparing values of types Int and Some[Int] using `==' will always yield false
+t5426.scala:3: warning: comparing values of types Int and Some[Int] using `==' will always yield false
def f2 = 5 == Some(5)
^
-t5426.scala:8: error: comparing values of types Int and Some[Int] using `==' will always yield false
+t5426.scala:8: warning: comparing values of types Int and Some[Int] using `==' will always yield false
(x1 == x2)
^
-t5426.scala:9: error: comparing values of types Some[Int] and Int using `==' will always yield false
+t5426.scala:9: warning: comparing values of types Some[Int] and Int using `==' will always yield false
(x2 == x1)
^
-four errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+four warnings found
+one error found
diff --git a/test/files/neg/t5663-badwarneq.check b/test/files/neg/t5663-badwarneq.check
index 00c2234e9d..12e93ff373 100644
--- a/test/files/neg/t5663-badwarneq.check
+++ b/test/files/neg/t5663-badwarneq.check
@@ -1,22 +1,24 @@
-t5663-badwarneq.scala:42: error: comparing case class values of types Some[Int] and None.type using `==' will always yield false
+t5663-badwarneq.scala:42: warning: comparing case class values of types Some[Int] and None.type using `==' will always yield false
println(new Some(1) == None) // Should complain on type, was: spuriously complains on fresh object
^
-t5663-badwarneq.scala:43: error: comparing case class values of types Some[Int] and Thing using `==' will always yield false
+t5663-badwarneq.scala:43: warning: comparing case class values of types Some[Int] and Thing using `==' will always yield false
println(Some(1) == new Thing(1)) // Should complain on type, was: spuriously complains on fresh object
^
-t5663-badwarneq.scala:51: error: ThingOne and Thingy are unrelated: they will most likely never compare equal
+t5663-badwarneq.scala:51: warning: ThingOne and Thingy are unrelated: they will most likely never compare equal
println(t1 == t2) // true, but apparently unrelated, a compromise warning
^
-t5663-badwarneq.scala:52: error: ThingThree and Thingy are unrelated: they will most likely never compare equal
+t5663-badwarneq.scala:52: warning: ThingThree and Thingy are unrelated: they will most likely never compare equal
println(t4 == t2) // true, complains because ThingThree is final and Thingy not a subclass, stronger claim than unrelated
^
-t5663-badwarneq.scala:55: error: comparing case class values of types ThingTwo and Some[Int] using `==' will always yield false
+t5663-badwarneq.scala:55: warning: comparing case class values of types ThingTwo and Some[Int] using `==' will always yield false
println(t3 == Some(1)) // false, warn on different cases
^
-t5663-badwarneq.scala:56: error: comparing values of types ThingOne and Cousin using `==' will always yield false
+t5663-badwarneq.scala:56: warning: comparing values of types ThingOne and Cousin using `==' will always yield false
println(t1 == c) // should warn
^
-t5663-badwarneq.scala:64: error: comparing case class values of types Simple and SimpleSibling.type using `==' will always yield false
+t5663-badwarneq.scala:64: warning: comparing case class values of types Simple and SimpleSibling.type using `==' will always yield false
println(new Simple() == SimpleSibling) // like Some(1) == None, but needn't be final case
^
-7 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+7 warnings found
+one error found
diff --git a/test/files/neg/t5830.check b/test/files/neg/t5830.check
index 726fac2a1e..58c3a1be38 100644
--- a/test/files/neg/t5830.check
+++ b/test/files/neg/t5830.check
@@ -1,7 +1,9 @@
-t5830.scala:6: error: unreachable code
+t5830.scala:6: warning: unreachable code
case 'a' => println("b") // unreachable
^
-t5830.scala:4: error: could not emit switch for @switch annotated match
+t5830.scala:4: warning: could not emit switch for @switch annotated match
def unreachable(ch: Char) = (ch: @switch) match {
^
-two errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+two warnings found
+one error found
diff --git a/test/files/neg/t6011.check b/test/files/neg/t6011.check
index 5b5a861e5b..cb7f189031 100644
--- a/test/files/neg/t6011.check
+++ b/test/files/neg/t6011.check
@@ -1,10 +1,12 @@
-t6011.scala:4: error: unreachable code
+t6011.scala:4: warning: unreachable code
case 'a' | 'c' => 1 // unreachable
^
-t6011.scala:10: error: unreachable code
+t6011.scala:10: warning: unreachable code
case 'b' | 'a' => 1 // unreachable
^
-t6011.scala:8: error: could not emit switch for @switch annotated match
+t6011.scala:8: warning: could not emit switch for @switch annotated match
def f2(ch: Char): Any = (ch: @annotation.switch) match {
^
-three errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found
diff --git a/test/files/neg/t6048.check b/test/files/neg/t6048.check
index 051f41877e..319e3fa620 100644
--- a/test/files/neg/t6048.check
+++ b/test/files/neg/t6048.check
@@ -1,10 +1,12 @@
-t6048.scala:3: error: unreachable code
+t6048.scala:3: warning: unreachable code
case _ if false => x // unreachable
^
-t6048.scala:8: error: unreachable code
+t6048.scala:8: warning: unreachable code
case _ if false => x // unreachable
^
-t6048.scala:14: error: unreachable code
+t6048.scala:14: warning: unreachable code
case 5 if true => x // unreachable
^
-three errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found
diff --git a/test/files/neg/unchecked-suppress.check b/test/files/neg/unchecked-suppress.check
index 2e23d21386..038105918e 100644
--- a/test/files/neg/unchecked-suppress.check
+++ b/test/files/neg/unchecked-suppress.check
@@ -1,10 +1,12 @@
-unchecked-suppress.scala:4: error: non-variable type argument Int in type pattern Set[Int] is unchecked since it is eliminated by erasure
+unchecked-suppress.scala:4: warning: non-variable type argument Int in type pattern Set[Int] is unchecked since it is eliminated by erasure
case xs: Set[Int] => xs.head // unchecked
^
-unchecked-suppress.scala:5: error: non-variable type argument String in type pattern Map[String @unchecked,String] is unchecked since it is eliminated by erasure
+unchecked-suppress.scala:5: warning: non-variable type argument String in type pattern Map[String @unchecked,String] is unchecked since it is eliminated by erasure
case xs: Map[String @unchecked, String] => xs.head // one unchecked, one okay
^
-unchecked-suppress.scala:7: error: non-variable type argument Int in type pattern (Int, Int) => Int is unchecked since it is eliminated by erasure
+unchecked-suppress.scala:7: warning: non-variable type argument Int in type pattern (Int, Int) => Int is unchecked since it is eliminated by erasure
case f: ((Int, Int) => Int) => // unchecked
^
-three errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found
diff --git a/test/files/neg/unchecked.check b/test/files/neg/unchecked.check
index 34a11db1a0..19b8c908da 100644
--- a/test/files/neg/unchecked.check
+++ b/test/files/neg/unchecked.check
@@ -1,19 +1,21 @@
-unchecked.scala:18: error: non-variable type argument String in type pattern Iterable[String] is unchecked since it is eliminated by erasure
+unchecked.scala:18: warning: non-variable type argument String in type pattern Iterable[String] is unchecked since it is eliminated by erasure
case xs: Iterable[String] => xs.head // unchecked
^
-unchecked.scala:22: error: non-variable type argument Any in type pattern Set[Any] is unchecked since it is eliminated by erasure
+unchecked.scala:22: warning: non-variable type argument Any in type pattern Set[Any] is unchecked since it is eliminated by erasure
case xs: Set[Any] => xs.head // unchecked
^
-unchecked.scala:26: error: non-variable type argument Any in type pattern Map[Any,Any] is unchecked since it is eliminated by erasure
+unchecked.scala:26: warning: non-variable type argument Any in type pattern Map[Any,Any] is unchecked since it is eliminated by erasure
case xs: Map[Any, Any] => xs.head // unchecked
^
-unchecked.scala:35: error: non-variable type argument List[Nothing] in type pattern Test.Contra[List[Nothing]] is unchecked since it is eliminated by erasure
+unchecked.scala:35: warning: non-variable type argument List[Nothing] in type pattern Test.Contra[List[Nothing]] is unchecked since it is eliminated by erasure
case xs: Contra[List[Nothing]] => xs.head // unchecked
^
-unchecked.scala:50: error: non-variable type argument String in type pattern Test.Exp[String] is unchecked since it is eliminated by erasure
+unchecked.scala:50: warning: non-variable type argument String in type pattern Test.Exp[String] is unchecked since it is eliminated by erasure
case ArrayApply(x: Exp[Array[T]], _, j: Exp[String]) => x // unchecked
^
-unchecked.scala:55: error: non-variable type argument Array[T] in type pattern Test.Exp[Array[T]] is unchecked since it is eliminated by erasure
+unchecked.scala:55: warning: non-variable type argument Array[T] in type pattern Test.Exp[Array[T]] is unchecked since it is eliminated by erasure
case ArrayApply(x: Exp[Array[T]], _, _) => x // unchecked
^
-6 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+6 warnings found
+one error found
diff --git a/test/files/neg/unchecked2.check b/test/files/neg/unchecked2.check
index e37865928e..599d11c43a 100644
--- a/test/files/neg/unchecked2.check
+++ b/test/files/neg/unchecked2.check
@@ -1,19 +1,21 @@
-unchecked2.scala:2: error: non-variable type argument Int in type Option[Int] is unchecked since it is eliminated by erasure
+unchecked2.scala:2: warning: non-variable type argument Int in type Option[Int] is unchecked since it is eliminated by erasure
Some(123).isInstanceOf[Option[Int]]
^
-unchecked2.scala:3: error: non-variable type argument String in type Option[String] is unchecked since it is eliminated by erasure
+unchecked2.scala:3: warning: non-variable type argument String in type Option[String] is unchecked since it is eliminated by erasure
Some(123).isInstanceOf[Option[String]]
^
-unchecked2.scala:4: error: non-variable type argument List[String] in type Option[List[String]] is unchecked since it is eliminated by erasure
+unchecked2.scala:4: warning: non-variable type argument List[String] in type Option[List[String]] is unchecked since it is eliminated by erasure
Some(123).isInstanceOf[Option[List[String]]]
^
-unchecked2.scala:5: error: non-variable type argument List[Int => String] in type Option[List[Int => String]] is unchecked since it is eliminated by erasure
+unchecked2.scala:5: warning: non-variable type argument List[Int => String] in type Option[List[Int => String]] is unchecked since it is eliminated by erasure
Some(123).isInstanceOf[Option[List[Int => String]]]
^
-unchecked2.scala:6: error: non-variable type argument (String, Double) in type Option[(String, Double)] is unchecked since it is eliminated by erasure
+unchecked2.scala:6: warning: non-variable type argument (String, Double) in type Option[(String, Double)] is unchecked since it is eliminated by erasure
Some(123).isInstanceOf[Option[(String, Double)]]
^
-unchecked2.scala:7: error: non-variable type argument String => Double in type Option[String => Double] is unchecked since it is eliminated by erasure
+unchecked2.scala:7: warning: non-variable type argument String => Double in type Option[String => Double] is unchecked since it is eliminated by erasure
Some(123).isInstanceOf[Option[String => Double]]
^
-6 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+6 warnings found
+one error found
diff --git a/test/files/neg/unit-returns-value.check b/test/files/neg/unit-returns-value.check
index ab458a350b..363946f94d 100644
--- a/test/files/neg/unit-returns-value.check
+++ b/test/files/neg/unit-returns-value.check
@@ -1,7 +1,9 @@
-unit-returns-value.scala:4: error: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+unit-returns-value.scala:4: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
if (b) return 5
^
-unit-returns-value.scala:4: error: enclosing method f has result type Unit: return value discarded
+unit-returns-value.scala:4: warning: enclosing method f has result type Unit: return value discarded
if (b) return 5
^
-two errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+two warnings found
+one error found
diff --git a/test/files/neg/virtpatmat_reach_null.check b/test/files/neg/virtpatmat_reach_null.check
index 595c8ec889..e0c36c8c5b 100644
--- a/test/files/neg/virtpatmat_reach_null.check
+++ b/test/files/neg/virtpatmat_reach_null.check
@@ -1,4 +1,6 @@
-virtpatmat_reach_null.scala:13: error: unreachable code
+virtpatmat_reach_null.scala:13: warning: unreachable code
case _ => // unreachable
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/virtpatmat_reach_sealed_unsealed.check b/test/files/neg/virtpatmat_reach_sealed_unsealed.check
index 10638eff52..064a12bcaa 100644
--- a/test/files/neg/virtpatmat_reach_sealed_unsealed.check
+++ b/test/files/neg/virtpatmat_reach_sealed_unsealed.check
@@ -1,14 +1,16 @@
-virtpatmat_reach_sealed_unsealed.scala:16: error: match may not be exhaustive.
+virtpatmat_reach_sealed_unsealed.scala:16: warning: match may not be exhaustive.
It would fail on the following input: false
(true: Boolean) match { case true => } // not exhaustive, but reachable
^
-virtpatmat_reach_sealed_unsealed.scala:18: error: unreachable code
+virtpatmat_reach_sealed_unsealed.scala:18: warning: unreachable code
(true: Boolean) match { case true => case false => case _ => } // exhaustive, last case is unreachable
^
-virtpatmat_reach_sealed_unsealed.scala:19: error: unreachable code
+virtpatmat_reach_sealed_unsealed.scala:19: warning: unreachable code
(true: Boolean) match { case true => case false => case _: Boolean => } // exhaustive, last case is unreachable
^
-virtpatmat_reach_sealed_unsealed.scala:20: error: unreachable code
+virtpatmat_reach_sealed_unsealed.scala:20: warning: unreachable code
(true: Boolean) match { case true => case false => case _: Any => } // exhaustive, last case is unreachable
^
-four errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+four warnings found
+one error found
diff --git a/test/files/neg/virtpatmat_unreach_select.check b/test/files/neg/virtpatmat_unreach_select.check
index 3771971020..4fc78cd412 100644
--- a/test/files/neg/virtpatmat_unreach_select.check
+++ b/test/files/neg/virtpatmat_unreach_select.check
@@ -1,4 +1,6 @@
-virtpatmat_unreach_select.scala:10: error: unreachable code
+virtpatmat_unreach_select.scala:10: warning: unreachable code
case WARNING.id => // unreachable
^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
one error found
diff --git a/test/files/neg/warn-inferred-any.check b/test/files/neg/warn-inferred-any.check
index 8c18616b6f..4628033e55 100644
--- a/test/files/neg/warn-inferred-any.check
+++ b/test/files/neg/warn-inferred-any.check
@@ -1,10 +1,12 @@
-warn-inferred-any.scala:8: error: a type was inferred to be `Any`; this may indicate a programming error.
+warn-inferred-any.scala:8: warning: a type was inferred to be `Any`; this may indicate a programming error.
{ List(1, 2, 3) contains "a" } // only this warns
^
-warn-inferred-any.scala:16: error: a type was inferred to be `AnyVal`; this may indicate a programming error.
+warn-inferred-any.scala:16: warning: a type was inferred to be `AnyVal`; this may indicate a programming error.
{ 1l to 5l contains 5 }
^
-warn-inferred-any.scala:17: error: a type was inferred to be `AnyVal`; this may indicate a programming error.
+warn-inferred-any.scala:17: warning: a type was inferred to be `AnyVal`; this may indicate a programming error.
{ 1l to 5l contains 5d }
^
-three errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found