summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-31 08:52:36 +0000
committerPaul Phillips <paulp@improving.org>2010-12-31 08:52:36 +0000
commit4db73388f2d63eb9b57fecfbd0d76203d7a71c18 (patch)
treeed06122bff32818e6debbd30600de287744b45bf /test/files/run
parent1259651a7ded65809d63d6b2744d4d097cc90ead (diff)
downloadscala-4db73388f2d63eb9b57fecfbd0d76203d7a71c18.tar.gz
scala-4db73388f2d63eb9b57fecfbd0d76203d7a71c18.tar.bz2
scala-4db73388f2d63eb9b57fecfbd0d76203d7a71c18.zip
Modified the self-type protected accessor test ...
Modified the self-type protected accessor test to avoid unnecessary runtime failures. Closes #4119, review by dragos.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/bug4119/J.java7
-rw-r--r--test/files/run/bug4119/S.scala14
2 files changed, 21 insertions, 0 deletions
diff --git a/test/files/run/bug4119/J.java b/test/files/run/bug4119/J.java
new file mode 100644
index 0000000000..ee65d33e22
--- /dev/null
+++ b/test/files/run/bug4119/J.java
@@ -0,0 +1,7 @@
+package foo.bar;
+
+public abstract class J {
+ protected void foo(J j) {
+ return;
+ }
+}
diff --git a/test/files/run/bug4119/S.scala b/test/files/run/bug4119/S.scala
new file mode 100644
index 0000000000..d6ae5f1b87
--- /dev/null
+++ b/test/files/run/bug4119/S.scala
@@ -0,0 +1,14 @@
+class S extends foo.bar.J {
+ sss =>
+
+ val fn = () => {
+ foo(S.this)
+ }
+ fn()
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ new S
+ }
+}