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/t8040.scala | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/files/pos/t8040.scala (limited to 'test/files/pos/t8040.scala') diff --git a/test/files/pos/t8040.scala b/test/files/pos/t8040.scala new file mode 100644 index 0000000000..b067f36b0b --- /dev/null +++ b/test/files/pos/t8040.scala @@ -0,0 +1,6 @@ + +object Test { + implicit class C(val sc: StringContext) { // no warn unused sc + def c(args: Any*): String = "c?" + args.mkString(",") // would warn unused args + } +} -- cgit v1.2.3