summaryrefslogtreecommitdiff
path: root/test/files/neg/t1960.scala
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.scala
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.scala')
-rw-r--r--test/files/neg/t1960.scala7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/files/neg/t1960.scala b/test/files/neg/t1960.scala
index 5311940b5a..f4fdb341c6 100644
--- a/test/files/neg/t1960.scala
+++ b/test/files/neg/t1960.scala
@@ -1,5 +1,2 @@
-object ClassFormatErrorExample extends App { new Aclass(1) }
-
-trait TBase { var p:Int = 0; def f(p1: Int) {} }
-
-class Aclass (p: Int) extends TBase { def g() { f(p) } }
+trait T { var vr: Int = 0 ; val vl: Int = 0 }
+class C(vr: Int, vl: Int) extends T { def ref = vr + vl }