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/t7860.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/t7860.check')
-rw-r--r-- | test/files/neg/t7860.check | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/neg/t7860.check b/test/files/neg/t7860.check new file mode 100644 index 0000000000..9b9d86c89d --- /dev/null +++ b/test/files/neg/t7860.check @@ -0,0 +1,9 @@ +t7860.scala:5: warning: private class for your eyes only in object Test is never used + private implicit class `for your eyes only`(i: Int) { // warn + ^ +t7860.scala:31: warning: private class C in object Test3 is never used + private implicit class C(val i: Int) extends AnyVal { // warn + ^ +error: No warnings can be incurred under -Xfatal-warnings. +two warnings found +one error found |