diff options
author | Paul Phillips <paulp@improving.org> | 2010-08-07 21:06:46 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-08-07 21:06:46 +0000 |
commit | 40aafbdf1a9a52c1236f07e06d48fb24b5fa2169 (patch) | |
tree | 8140580613811d40665606a28e6d198934984b2f /test/files | |
parent | ed3dddae4e8b55917217b202f54d5b918ce4030e (diff) | |
download | scala-40aafbdf1a9a52c1236f07e06d48fb24b5fa2169.tar.gz scala-40aafbdf1a9a52c1236f07e06d48fb24b5fa2169.tar.bz2 scala-40aafbdf1a9a52c1236f07e06d48fb24b5fa2169.zip |
Modified r22702 to avoid tarring overloads with...
Modified r22702 to avoid tarring overloads with the same brush. No
review.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/bug3736.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/bug3736.scala b/test/files/neg/bug3736.scala index 8e63021f69..cf0920912a 100644 --- a/test/files/neg/bug3736.scala +++ b/test/files/neg/bug3736.scala @@ -8,6 +8,19 @@ object Test { def f6 = super.## } + // Ill-advised overloads to be sure... + class B { + def ##(x: String) = true + def ==(x1: String, xs: List[_]) = true + def !=(x1: String, xs: List[_]) = true + } + + class C extends B { + override def ##(x: String) = super.##(x) + override def ==(x1: String, xs: List[_]) = super.==(x1, xs) + override def !=(x1: String, xs: List[_]) = super.!=(x1, xs) + } + def main(args: Array[String]): Unit = { val x = new A x.f1 |