From 785f4fe224302bbddbbd6a198f1722b4c0ae17f7 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Tue, 20 Dec 2016 14:35:43 -0800 Subject: SI-8040 Xlint enables unused warnings `-Ywarn-unused-import` is deprecated in favor of `-Ywarn-unused:imports`. `-Xlint` does not yet enable `-Ywarn-unused:patvars`. But the default for `-Ywarn-unused` is everything, including `patvars`. So `-Xlint:unused` is the populist option, `-Ywarn-unused` more exclusive. Tests are fixed by narrowing scope of `-Xlint` when specified. --- test/files/pos/t6091.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/files/pos/t6091.scala') diff --git a/test/files/pos/t6091.scala b/test/files/pos/t6091.scala index 72e663ec3b..0318640e7b 100644 --- a/test/files/pos/t6091.scala +++ b/test/files/pos/t6091.scala @@ -1,6 +1,6 @@ -object Foo { def eq(x:Int) = x } +object Foo { def eq(x: Int) = x } -class X { def ==(other: String) = true } +class X { def ==(other: String) = other.nonEmpty } object Test { def main(args: Array[String]): Unit = { -- cgit v1.2.3