summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-07-03 05:19:47 +0000
committerPaul Phillips <paulp@improving.org>2010-07-03 05:19:47 +0000
commit7a8a37e5f154da49cca1ea7e36ab94d16751ec66 (patch)
tree21223473be03b8449048f147f6621054f003cecd /test
parent39e4641ec932965eaa9ef30b3954aef3f0579fa5 (diff)
downloadscala-7a8a37e5f154da49cca1ea7e36ab94d16751ec66.tar.gz
scala-7a8a37e5f154da49cca1ea7e36ab94d16751ec66.tar.bz2
scala-7a8a37e5f154da49cca1ea7e36ab94d16751ec66.zip
Test case closes #261, no review.
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