From e498fac7fdbda3187a2a4fffcdf7fa4f9ddb7ac8 Mon Sep 17 00:00:00 2001 From: amin Date: Tue, 11 Sep 2012 15:09:03 +0200 Subject: Fix for SI-6245 with workaround for SI-2296. protected/super accessor issue: Don't subvert the creation of the standard protected accessor with the java interop accessor. For SI-2296, the compiler emits an error instead of causing an illegal access error at runtime. --- test/files/neg/t2296a/J.java | 7 +++++++ test/files/neg/t2296a/S.scala | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/files/neg/t2296a/J.java create mode 100644 test/files/neg/t2296a/S.scala (limited to 'test/files/neg/t2296a') diff --git a/test/files/neg/t2296a/J.java b/test/files/neg/t2296a/J.java new file mode 100644 index 0000000000..78ff3e9804 --- /dev/null +++ b/test/files/neg/t2296a/J.java @@ -0,0 +1,7 @@ +package j; + +public class J { + protected void foo() { + System.out.println("J.foo()"); + } +} \ No newline at end of file diff --git a/test/files/neg/t2296a/S.scala b/test/files/neg/t2296a/S.scala new file mode 100644 index 0000000000..532d038a42 --- /dev/null +++ b/test/files/neg/t2296a/S.scala @@ -0,0 +1,18 @@ +package s { + import j.J + + trait S extends J { + def bar() { + foo() + } + } + + class SC extends J with S +} + +object Test { + def main(args : Array[String]) { + (new s.SC).bar() + (new s.S { }).bar() + } +} \ No newline at end of file -- cgit v1.2.3