diff options
author | Som Snytt <som.snytt@gmail.com> | 2016-10-19 12:09:40 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2017-03-11 23:48:31 -0800 |
commit | 833724b131f86b978f0831f637d386d7ca37a2aa (patch) | |
tree | 2033b6e43ab889e8fad2518b75cfce23adde4855 /test/files/neg/warn-unused-privates.check | |
parent | a85521efbbf65161debc460ab5cb55562db051e9 (diff) | |
download | scala-833724b131f86b978f0831f637d386d7ca37a2aa.tar.gz scala-833724b131f86b978f0831f637d386d7ca37a2aa.tar.bz2 scala-833724b131f86b978f0831f637d386d7ca37a2aa.zip |
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.
Diffstat (limited to 'test/files/neg/warn-unused-privates.check')
-rw-r--r-- | test/files/neg/warn-unused-privates.check | 5 |
1 files changed, 4 insertions, 1 deletions
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 |