diff options
Diffstat (limited to 'libjava/testsuite/libjava.lang/stringconst.java')
-rw-r--r-- | libjava/testsuite/libjava.lang/stringconst.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.lang/stringconst.java b/libjava/testsuite/libjava.lang/stringconst.java new file mode 100644 index 0000000..6285749 --- /dev/null +++ b/libjava/testsuite/libjava.lang/stringconst.java @@ -0,0 +1,22 @@ +// A reference to a String shouldn't cause an interface to be +// initialized. + +interface I +{ + String z = "zardoz"; + int q = stringconst.out ("q", 0); +} + +public class stringconst +{ + public static int out (String s, int i) + { + System.out.println (s + "=" + i); + return i; + } + + public static void main (String[] args) + { + System.out.println (I.z); + } +} |