aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/privates.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-10-30 17:09:34 +0100
committerMartin Odersky <odersky@gmail.com>2014-11-09 10:17:34 +0100
commit250418e830bc7ccacf13cb0d3a9121238d99632a (patch)
tree4acd1112a048d3299557deb17de920d343fc1ac3 /tests/pos/privates.scala
parentd907f26da9f0d3625a4c35021993f04a553bd354 (diff)
downloaddotty-250418e830bc7ccacf13cb0d3a9121238d99632a.tar.gz
dotty-250418e830bc7ccacf13cb0d3a9121238d99632a.tar.bz2
dotty-250418e830bc7ccacf13cb0d3a9121238d99632a.zip
New phase: PrivateToStatic
Make private methods in traits static, so that we do not need to give a default for them.
Diffstat (limited to 'tests/pos/privates.scala')
-rw-r--r--tests/pos/privates.scala9
1 files changed, 9 insertions, 0 deletions
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()
+
+}