summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-05-08 19:16:13 +0000
committerPaul Phillips <paulp@improving.org>2009-05-08 19:16:13 +0000
commit1e8d2048517dcd57b33bbd27e850f6362e5e7074 (patch)
treef0ec374df190f826e8b9af009a3cc1b9a3b89bb9 /test
parentf3c0640e3d7270795cc15dc923d811074c0836d7 (diff)
downloadscala-1e8d2048517dcd57b33bbd27e850f6362e5e7074.tar.gz
scala-1e8d2048517dcd57b33bbd27e850f6362e5e7074.tar.bz2
scala-1e8d2048517dcd57b33bbd27e850f6362e5e7074.zip
Fix and test case for #1960.
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/bug1960.check4
-rw-r--r--test/files/neg/bug1960.scala5
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/neg/bug1960.check b/test/files/neg/bug1960.check
new file mode 100644
index 0000000000..6615d90036
--- /dev/null
+++ b/test/files/neg/bug1960.check
@@ -0,0 +1,4 @@
+bug1960.scala:5: error: parameter 'p' requires field but conflicts with p in 'TBase'
+class Aclass (p: Int) extends TBase { def g{ f(p) } }
+ ^
+one error found
diff --git a/test/files/neg/bug1960.scala b/test/files/neg/bug1960.scala
new file mode 100644
index 0000000000..b381e9df23
--- /dev/null
+++ b/test/files/neg/bug1960.scala
@@ -0,0 +1,5 @@
+object ClassFormatErrorExample extends Application { new Aclass(1) }
+
+trait TBase { var p:Int = 0; def f(p1: Int) {} }
+
+class Aclass (p: Int) extends TBase { def g{ f(p) } }