summaryrefslogtreecommitdiff
path: root/test/files/run/t1430
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-11-28 08:03:10 +0000
committerPaul Phillips <paulp@improving.org>2011-11-28 08:03:10 +0000
commit0bea2ab5f6b211a83bbf14ea46fe57b8163c6334 (patch)
tree1eda4c329deee6b43d82f5922fc58f3de878638d /test/files/run/t1430
parente4c5e04b06fc434eace07798486a108b6e2d4ae7 (diff)
downloadscala-0bea2ab5f6b211a83bbf14ea46fe57b8163c6334.tar.gz
scala-0bea2ab5f6b211a83bbf14ea46fe57b8163c6334.tar.bz2
scala-0bea2ab5f6b211a83bbf14ea46fe57b8163c6334.zip
Fix for erroneous bytecode generation.
A remedy for an IllegalAccessError where generated bytecode referred to an inaccessible type. Closes SI-1430. Bonus materials: - tore out all the invokedynamic support. The shipped jdk7 implementation shows limited resemblance to the one this was written against; the code mostly serves to distract. (I think I could get invokedynamic working pretty quickly, except that it would mean having a codebase for java7 and one for 5-6, which is not a yak I wish to shave today.) - gave NullClass and NothingClass objects of their own, which allowed a nice polymorphic simplification of isSubClass, plus a couple other streamlinings.
Diffstat (limited to 'test/files/run/t1430')
-rw-r--r--test/files/run/t1430/Bar_1.java8
-rw-r--r--test/files/run/t1430/Test_2.scala16
2 files changed, 24 insertions, 0 deletions
diff --git a/test/files/run/t1430/Bar_1.java b/test/files/run/t1430/Bar_1.java
new file mode 100644
index 0000000000..4db2eafcbd
--- /dev/null
+++ b/test/files/run/t1430/Bar_1.java
@@ -0,0 +1,8 @@
+package j;
+
+interface Foo {
+ public void foo();
+}
+public interface Bar_1 extends Foo {
+ public void bar();
+}
diff --git a/test/files/run/t1430/Test_2.scala b/test/files/run/t1430/Test_2.scala
new file mode 100644
index 0000000000..7af65de5cd
--- /dev/null
+++ b/test/files/run/t1430/Test_2.scala
@@ -0,0 +1,16 @@
+package s {
+ object Boop extends j.Bar_1 {
+ def foo() {}
+ def bar() {}
+ }
+ class Baz(x: j.Bar_1) {
+ x.foo
+ override def toString = "Baz"
+ }
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ println(new s.Baz(s.Boop))
+ }
+}