From 833724b131f86b978f0831f637d386d7ca37a2aa Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Wed, 19 Oct 2016 12:09:40 -0700 Subject: SI-7860 No warn private implicit value class Previously, warned on unused synthetic companion. Also avoid false negative via hashcode reference to the underlying value. Avoid the synthetic conversion method for the implicit class (whose RHS always uses the class); the def itself is synthetic so is normally not warned. --- test/files/neg/warn-unused-privates.check | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/files/neg/warn-unused-privates.check') diff --git a/test/files/neg/warn-unused-privates.check b/test/files/neg/warn-unused-privates.check index 490e070794..d4853847fd 100644 --- a/test/files/neg/warn-unused-privates.check +++ b/test/files/neg/warn-unused-privates.check @@ -97,6 +97,9 @@ warn-unused-privates.scala:118: warning: local class DingDongDoobie is never use warn-unused-privates.scala:121: warning: local type OtherThing is never used type OtherThing = String // warn ^ +warn-unused-privates.scala:216: warning: private class for your eyes only in object not even using companion privates is never used + private implicit class `for your eyes only`(i: Int) { // warn + ^ warn-unused-privates.scala:201: warning: pattern var z in method f is never used; `z@_' suppresses this warning case z => "warn" ^ @@ -104,5 +107,5 @@ warn-unused-privates.scala:208: warning: pattern var z in method f is never used case Some(z) => "warn" ^ error: No warnings can be incurred under -Xfatal-warnings. -35 warnings found +36 warnings found one error found -- cgit v1.2.3