summaryrefslogtreecommitdiff
path: root/test/files/neg/t1960.check
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan@lightbend.com>2016-10-12 16:06:40 -0700
committerAdriaan Moors <adriaan@lightbend.com>2016-10-12 16:08:18 -0700
commitb2b459115a7a0e1767bece648c1fdaf84533dce2 (patch)
tree0363dfc16fce3b107949790ce843666af56f3f95 /test/files/neg/t1960.check
parent1e81a09a896a0d7497687b5df1b8220172eaec92 (diff)
downloadscala-b2b459115a7a0e1767bece648c1fdaf84533dce2.tar.gz
scala-b2b459115a7a0e1767bece648c1fdaf84533dce2.tar.bz2
scala-b2b459115a7a0e1767bece648c1fdaf84533dce2.zip
Detect clash of mixedin val and existing member.
Before, we looked only at the result type, which was silly. This was originally motivated by a hack to get to the error about conflicting paramaccessors. The error detection for that can now be formulated more directly. Fixes scala/scala-dev#244
Diffstat (limited to 'test/files/neg/t1960.check')
-rw-r--r--test/files/neg/t1960.check11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/files/neg/t1960.check b/test/files/neg/t1960.check
index de0907b4a9..bb6d3d3548 100644
--- a/test/files/neg/t1960.check
+++ b/test/files/neg/t1960.check
@@ -1,4 +1,7 @@
-t1960.scala:5: error: parameter 'p' requires field but conflicts with variable p in trait TBase
-class Aclass (p: Int) extends TBase { def g() { f(p) } }
- ^
-one error found
+t1960.scala:2: error: parameter 'vr' requires field but conflicts with variable vr in trait T
+class C(vr: Int, vl: Int) extends T { def ref = vr + vl }
+ ^
+t1960.scala:2: error: parameter 'vl' requires field but conflicts with value vl in trait T
+class C(vr: Int, vl: Int) extends T { def ref = vr + vl }
+ ^
+two errors found