aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.compile/invokeinterface
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/testsuite/libjava.compile/invokeinterface')
-rw-r--r--libjava/testsuite/libjava.compile/invokeinterface/A.java4
-rw-r--r--libjava/testsuite/libjava.compile/invokeinterface/B.java4
-rw-r--r--libjava/testsuite/libjava.compile/invokeinterface/Test.java19
3 files changed, 27 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.compile/invokeinterface/A.java b/libjava/testsuite/libjava.compile/invokeinterface/A.java
new file mode 100644
index 0000000..a4167cd
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/invokeinterface/A.java
@@ -0,0 +1,4 @@
+public interface A
+{
+ public void a();
+}
diff --git a/libjava/testsuite/libjava.compile/invokeinterface/B.java b/libjava/testsuite/libjava.compile/invokeinterface/B.java
new file mode 100644
index 0000000..3661e09
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/invokeinterface/B.java
@@ -0,0 +1,4 @@
+public interface B extends A
+{
+ public void b();
+}
diff --git a/libjava/testsuite/libjava.compile/invokeinterface/Test.java b/libjava/testsuite/libjava.compile/invokeinterface/Test.java
new file mode 100644
index 0000000..2fb793f
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/invokeinterface/Test.java
@@ -0,0 +1,19 @@
+public class Test implements B
+{
+ public static void main(String args[])
+ {
+ Test t = new Test();
+ B a = (B) t;
+ a.a();
+ }
+
+ public void a()
+ {
+ System.out.println("A");
+ }
+
+ public void b()
+ {
+ System.out.println("B");
+ }
+}