aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/traits.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/traits.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/traits.scala')
-rw-r--r--tests/pos/traits.scala25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/pos/traits.scala b/tests/pos/traits.scala
new file mode 100644
index 000000000..15310d5a4
--- /dev/null
+++ b/tests/pos/traits.scala
@@ -0,0 +1,25 @@
+trait B {
+
+ val z: Int
+
+}
+
+trait T {
+
+ var x = 2
+
+ private var xp = 2
+
+ val y = 3
+
+ private val yp = 3
+
+ val z = 4
+
+ x = 4
+
+ xp = 4
+
+}
+
+class C extends T