summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/bug261-ab.scala9
-rw-r--r--test/files/pos/bug261-ba.scala9
2 files changed, 18 insertions, 0 deletions
diff --git a/test/files/pos/bug261-ab.scala b/test/files/pos/bug261-ab.scala
new file mode 100644
index 0000000000..80699e692c
--- /dev/null
+++ b/test/files/pos/bug261-ab.scala
@@ -0,0 +1,9 @@
+trait A { val foo: String = "A" }
+trait B {
+ private val foo: String = "B"
+ def f = println(foo)
+}
+object Test extends Application with B with A {
+ println(foo) // prints "A", as expected
+ f // prints "B", as expected
+} \ No newline at end of file
diff --git a/test/files/pos/bug261-ba.scala b/test/files/pos/bug261-ba.scala
new file mode 100644
index 0000000000..c66a68d101
--- /dev/null
+++ b/test/files/pos/bug261-ba.scala
@@ -0,0 +1,9 @@
+trait B {
+ private val foo: String = "B"
+ def f = println(foo)
+}
+trait A { val foo: String = "A" }
+object Test extends Application with B with A {
+ println(foo) // prints "A", as expected
+ f // prints "B", as expected
+} \ No newline at end of file