diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-09-16 11:37:26 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-09-16 11:37:26 +1000 |
commit | 89dda8485809124ef343ebe0ec58ca7579c4dc4f (patch) | |
tree | ade4492f74d52b5603398cfa4463dbbf2d9c4437 /test/files | |
parent | e3af449ed504731d86581f8eec1f99e12526d747 (diff) | |
parent | 1b9806171940d304b41442b788717d2425764cbf (diff) | |
download | scala-89dda8485809124ef343ebe0ec58ca7579c4dc4f.tar.gz scala-89dda8485809124ef343ebe0ec58ca7579c4dc4f.tar.bz2 scala-89dda8485809124ef343ebe0ec58ca7579c4dc4f.zip |
Merge commit '1b98061' into merge/2.11.x-to-2.12.x-20140915
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/warn-unused-privates.check | 39 | ||||
-rw-r--r-- | test/files/neg/warn-unused-privates.scala | 1 |
2 files changed, 22 insertions, 18 deletions
diff --git a/test/files/neg/warn-unused-privates.check b/test/files/neg/warn-unused-privates.check index d012869c93..4876ed8fc2 100644 --- a/test/files/neg/warn-unused-privates.check +++ b/test/files/neg/warn-unused-privates.check @@ -10,57 +10,60 @@ warn-unused-privates.scala:6: warning: private val in class Bippy is never used warn-unused-privates.scala:13: warning: private val in object Bippy is never used private val HEY_INSTANCE: Int = 1000 // warn ^ -warn-unused-privates.scala:35: warning: private val in class Boppy is never used +warn-unused-privates.scala:14: warning: private val in object Bippy is never used + private lazy val BOOL: Boolean = true // warn + ^ +warn-unused-privates.scala:36: warning: private val in class Boppy is never used private val hummer = "def" // warn ^ -warn-unused-privates.scala:42: warning: private var in trait Accessors is never used +warn-unused-privates.scala:43: warning: private var in trait Accessors is never used private var v1: Int = 0 // warn ^ -warn-unused-privates.scala:42: warning: private setter in trait Accessors is never used +warn-unused-privates.scala:43: warning: private setter in trait Accessors is never used private var v1: Int = 0 // warn ^ -warn-unused-privates.scala:43: warning: private setter in trait Accessors is never used +warn-unused-privates.scala:44: warning: private setter in trait Accessors is never used private var v2: Int = 0 // warn, never set ^ -warn-unused-privates.scala:44: warning: private var in trait Accessors is never used +warn-unused-privates.scala:45: warning: private var in trait Accessors is never used private var v3: Int = 0 // warn, never got ^ -warn-unused-privates.scala:56: warning: private default argument in trait DefaultArgs is never used +warn-unused-privates.scala:57: warning: private default argument in trait DefaultArgs is never used private def bippy(x1: Int, x2: Int = 10, x3: Int = 15): Int = x1 + x2 + x3 ^ -warn-unused-privates.scala:56: warning: private default argument in trait DefaultArgs is never used +warn-unused-privates.scala:57: warning: private default argument in trait DefaultArgs is never used private def bippy(x1: Int, x2: Int = 10, x3: Int = 15): Int = x1 + x2 + x3 ^ -warn-unused-privates.scala:67: warning: local var in method f0 is never used +warn-unused-privates.scala:68: warning: local var in method f0 is never used var x = 1 // warn ^ -warn-unused-privates.scala:74: warning: local val in method f1 is never used +warn-unused-privates.scala:75: warning: local val in method f1 is never used val b = new Outer // warn ^ -warn-unused-privates.scala:84: warning: private object in object Types is never used +warn-unused-privates.scala:85: warning: private object in object Types is never used private object Dongo { def f = this } // warn ^ -warn-unused-privates.scala:94: warning: local object in method l1 is never used +warn-unused-privates.scala:95: warning: local object in method l1 is never used object HiObject { def f = this } // warn ^ -warn-unused-privates.scala:78: warning: local var x in method f2 is never set - it could be a val +warn-unused-privates.scala:79: warning: local var x in method f2 is never set - it could be a val var x = 100 // warn about it being a var ^ -warn-unused-privates.scala:85: warning: private class Bar1 in object Types is never used +warn-unused-privates.scala:86: warning: private class Bar1 in object Types is never used private class Bar1 // warn ^ -warn-unused-privates.scala:87: warning: private type Alias1 in object Types is never used +warn-unused-privates.scala:88: warning: private type Alias1 in object Types is never used private type Alias1 = String // warn ^ -warn-unused-privates.scala:95: warning: local class Hi is never used +warn-unused-privates.scala:96: warning: local class Hi is never used class Hi { // warn ^ -warn-unused-privates.scala:99: warning: local class DingDongDoobie is never used +warn-unused-privates.scala:100: warning: local class DingDongDoobie is never used class DingDongDoobie // warn ^ -warn-unused-privates.scala:102: warning: local type OtherThing is never used +warn-unused-privates.scala:103: warning: local type OtherThing is never used type OtherThing = String // warn ^ error: No warnings can be incurred under -Xfatal-warnings. -21 warnings found +22 warnings found one error found diff --git a/test/files/neg/warn-unused-privates.scala b/test/files/neg/warn-unused-privates.scala index cb6e946a34..2faa07e759 100644 --- a/test/files/neg/warn-unused-privates.scala +++ b/test/files/neg/warn-unused-privates.scala @@ -11,6 +11,7 @@ object Bippy { def hi(x: Bippy) = x.HI_COMPANION private val HI_INSTANCE: Int = 500 // no warn, accessed from instance private val HEY_INSTANCE: Int = 1000 // warn + private lazy val BOOL: Boolean = true // warn } class A(val msg: String) |