aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/testsuite/libjava.lang')
-rw-r--r--libjava/testsuite/libjava.lang/PR162.java29
-rw-r--r--libjava/testsuite/libjava.lang/PR162.out4
2 files changed, 33 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.lang/PR162.java b/libjava/testsuite/libjava.lang/PR162.java
new file mode 100644
index 0000000..a9f802c
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/PR162.java
@@ -0,0 +1,29 @@
+interface I
+{
+ int i = 1, ii = Test.out ("ii", 2);
+}
+
+interface J extends I
+{
+ int j = Test.out ("j", 3), jj = Test.out ("jj", 4);
+}
+
+interface K extends J
+{
+ int k = Test.out ("k", 5);
+}
+
+public class PR162
+{
+ public static void main (String[] args)
+ {
+ System.out.println (J.i);
+ System.out.println (K.j);
+ }
+
+ public static int out (String s, int i)
+ {
+ System.out.println (s + "=" + i);
+ return i;
+ }
+}
diff --git a/libjava/testsuite/libjava.lang/PR162.out b/libjava/testsuite/libjava.lang/PR162.out
new file mode 100644
index 0000000..6510a2d
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/PR162.out
@@ -0,0 +1,4 @@
+1
+j=3
+jj=4
+3