From 780bed7fbb77d095cbc03eb0244f8b1f1e4cf88c Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 3 May 2012 12:54:57 -0700 Subject: Fix for Dynamic interaction with private methods. Don't let inaccessible methods prevent calls to *Dynamic, otherwise we are at the mercy of every "private" alteration in every class we inherit. Closes SI-5040. --- test/files/run/t5040.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/files/run/t5040.scala (limited to 'test/files/run/t5040.scala') diff --git a/test/files/run/t5040.scala b/test/files/run/t5040.scala new file mode 100644 index 0000000000..6cd2c22234 --- /dev/null +++ b/test/files/run/t5040.scala @@ -0,0 +1,11 @@ +abstract class Prova2 extends Dynamic { + def applyDynamic(m: String)(): Unit + private def privateMethod() = println("private method") +} + +object Test extends App { + val prova= new Prova2 { + def applyDynamic(m: String)() = println("applyDynamic") + } + prova.privateMethod() +} -- cgit v1.2.3