diff options
author | Martin Odersky <odersky@gmail.com> | 2009-12-18 15:18:44 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-12-18 15:18:44 +0000 |
commit | ce4572ca49c2ba0db6b02ffffdece66c4cd3b5e8 (patch) | |
tree | 8424ae264cdfa0158c1ff8329c95c7d8798882d3 /test/files/neg | |
parent | 32bfcc419420300ecb294e5fb1c8210f5fbe6d6d (diff) | |
download | scala-ce4572ca49c2ba0db6b02ffffdece66c4cd3b5e8.tar.gz scala-ce4572ca49c2ba0db6b02ffffdece66c4cd3b5e8.tar.bz2 scala-ce4572ca49c2ba0db6b02ffffdece66c4cd3b5e8.zip |
Closed #2779. review by community.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t2779.check | 4 | ||||
-rwxr-xr-x | test/files/neg/t2779.scala | 25 |
2 files changed, 29 insertions, 0 deletions
diff --git a/test/files/neg/t2779.check b/test/files/neg/t2779.check new file mode 100644 index 0000000000..4f94a780a1 --- /dev/null +++ b/test/files/neg/t2779.check @@ -0,0 +1,4 @@ +t2779.scala:16: error: method f is defined twice + override def f = List(M1) + ^ +one error found diff --git a/test/files/neg/t2779.scala b/test/files/neg/t2779.scala new file mode 100755 index 0000000000..d025055aa0 --- /dev/null +++ b/test/files/neg/t2779.scala @@ -0,0 +1,25 @@ +abstract class M +{ + def f: List[M] = Nil +} + +object M1 extends M + +object M2 extends M +{ + override def f = List(M1) +} + +object M3 extends M +{ + override def f = List(M1) + override def f = List(M1) +} + +object M4 extends M +{ + override def f = List( + M3, + M2 + ) +} |