aboutsummaryrefslogtreecommitdiff
path: root/tests/run/duplicate-meth.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/duplicate-meth.scala')
-rw-r--r--tests/run/duplicate-meth.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/run/duplicate-meth.scala b/tests/run/duplicate-meth.scala
new file mode 100644
index 000000000..481c869d9
--- /dev/null
+++ b/tests/run/duplicate-meth.scala
@@ -0,0 +1,23 @@
+
+trait Base {
+ private val secure_# = 10l
+}
+
+class TestUser extends Base {
+ def clsMeth(x: Int) = x
+ private def foo(x: Int) = x
+}
+
+object TestUser extends TestUser {
+ def objMeth = "a"
+
+ private def foo(x: Int) = x
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ TestUser.objMeth
+ // no-op, just check that it passes verification
+ println("verified!")
+ }
+}