summaryrefslogtreecommitdiff
path: root/test/files/neg/t5429.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-06-17 11:47:11 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-06-17 11:55:12 +0200
commit2d3b6bd321724c565fd458a2bbffb4ad211c54ff (patch)
treed512a70ac2148ebec4b9528852357f6dacebd8ab /test/files/neg/t5429.check
parent277dc7cf43566f8294bde4143107d9bfaa59e8e3 (diff)
downloadscala-2d3b6bd321724c565fd458a2bbffb4ad211c54ff.tar.gz
scala-2d3b6bd321724c565fd458a2bbffb4ad211c54ff.tar.bz2
scala-2d3b6bd321724c565fd458a2bbffb4ad211c54ff.zip
SI-5617 Better error message for "x overrides nothing".
"It looks like you're trying to override a method", notes Clippy.
Diffstat (limited to 'test/files/neg/t5429.check')
-rw-r--r--test/files/neg/t5429.check20
1 files changed, 15 insertions, 5 deletions
diff --git a/test/files/neg/t5429.check b/test/files/neg/t5429.check
index 1b89c59587..4350696bc8 100644
--- a/test/files/neg/t5429.check
+++ b/test/files/neg/t5429.check
@@ -46,14 +46,18 @@ t5429.scala:38: error: overriding method emptyArg in class A of type ()Int;
object emptyArg has incompatible type
override object emptyArg // fail
^
-t5429.scala:39: error: object oneArg overrides nothing
+t5429.scala:39: error: object oneArg overrides nothing.
+Note: the super classes of class C contain the following, non final members named oneArg:
+def oneArg(x: String): Int
override object oneArg // fail
^
t5429.scala:43: error: overriding lazy value lazyvalue in class A0 of type Any;
object lazyvalue must be declared lazy to override a concrete lazy value
override object lazyvalue // !!! this fails, but should succeed (lazy over lazy)
^
-t5429.scala:46: error: object oneArg overrides nothing
+t5429.scala:46: error: object oneArg overrides nothing.
+Note: the super classes of class C0 contain the following, non final members named oneArg:
+def oneArg(x: String): Any
override object oneArg // fail
^
t5429.scala:50: error: overriding value value in class A of type Int;
@@ -76,7 +80,9 @@ t5429.scala:58: error: overriding lazy value lazyvalue in class A0 of type Any;
value lazyvalue must be declared lazy to override a concrete lazy value
override val lazyvalue = 0 // fail (non-lazy)
^
-t5429.scala:61: error: value oneArg overrides nothing
+t5429.scala:61: error: value oneArg overrides nothing.
+Note: the super classes of class D0 contain the following, non final members named oneArg:
+def oneArg(x: String): Any
override val oneArg = 15 // fail
^
t5429.scala:65: error: overriding value value in class A of type Int;
@@ -103,7 +109,9 @@ t5429.scala:73: error: overriding lazy value lazyvalue in class A0 of type Any;
method lazyvalue needs to be a stable, immutable value
override def lazyvalue = 2 // fail
^
-t5429.scala:76: error: method oneArg overrides nothing
+t5429.scala:76: error: method oneArg overrides nothing.
+Note: the super classes of class E0 contain the following, non final members named oneArg:
+def oneArg(x: String): Any
override def oneArg = 15 // fail
^
t5429.scala:80: error: overriding value value in class A of type Int;
@@ -126,7 +134,9 @@ t5429.scala:87: error: overriding value value in class A0 of type Any;
lazy value value cannot override a concrete non-lazy value
override lazy val value = 0 // fail (strict over lazy)
^
-t5429.scala:91: error: value oneArg overrides nothing
+t5429.scala:91: error: value oneArg overrides nothing.
+Note: the super classes of class F0 contain the following, non final members named oneArg:
+def oneArg(x: String): Any
override lazy val oneArg = 15 // fail
^
34 errors found