diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/bug4174.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug4174.scala | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/bug4174.check b/test/files/neg/bug4174.check new file mode 100644 index 0000000000..4881c000ea --- /dev/null +++ b/test/files/neg/bug4174.check @@ -0,0 +1,4 @@ +bug4174.scala:7: error: method bar overrides nothing + foo(new C { override def bar = 1 }) + ^ +one error found diff --git a/test/files/neg/bug4174.scala b/test/files/neg/bug4174.scala new file mode 100644 index 0000000000..b4a5ab29da --- /dev/null +++ b/test/files/neg/bug4174.scala @@ -0,0 +1,9 @@ +class C + +object Test { + def foo(c: C) = 0 + + def main(args: Array[String]): Unit = { + foo(new C { override def bar = 1 }) + } +} |