From 250418e830bc7ccacf13cb0d3a9121238d99632a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 30 Oct 2014 17:09:34 +0100 Subject: New phase: PrivateToStatic Make private methods in traits static, so that we do not need to give a default for them. --- tests/pos/privates.scala | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/pos/privates.scala (limited to 'tests/pos/privates.scala') diff --git a/tests/pos/privates.scala b/tests/pos/privates.scala new file mode 100644 index 000000000..edaa10cb6 --- /dev/null +++ b/tests/pos/privates.scala @@ -0,0 +1,9 @@ +trait Test { + + private val x = 2 + + private def foo() = x * x + + private def bar() = foo() + +} -- cgit v1.2.3