diff options
author | Tom Tromey <tromey@redhat.com> | 2005-12-16 00:00:43 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2005-12-16 00:00:43 +0000 |
commit | 86bcd3a2247ce5405642631f1a7167933a487f36 (patch) | |
tree | e06c0bfb5fa1f496d9e6efbc365804803285a3a4 /libjava/testsuite/libjava.compile | |
parent | 094bb856e66fc86a004c604331cbc4bd17472369 (diff) | |
download | gcc-86bcd3a2247ce5405642631f1a7167933a487f36.zip gcc-86bcd3a2247ce5405642631f1a7167933a487f36.tar.gz gcc-86bcd3a2247ce5405642631f1a7167933a487f36.tar.bz2 |
re PR java/25429 (can't see private static final int CREATE = 1)
gcc/java:
PR java/25429
* parse.y (resolve_expression_name): Don't generate accessor
methods for constant fields.
libjava:
* testsuite/libjava.compile/rh175833.java: New file.
* testsuite/libjava.compile/pr25429.java: New file.
Co-Authored-By: Andrew Haley <aph@redhat.com>
From-SVN: r108608
Diffstat (limited to 'libjava/testsuite/libjava.compile')
-rw-r--r-- | libjava/testsuite/libjava.compile/pr25429.java | 13 | ||||
-rw-r--r-- | libjava/testsuite/libjava.compile/rh175833.java | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.compile/pr25429.java b/libjava/testsuite/libjava.compile/pr25429.java new file mode 100644 index 0000000..a869b58 --- /dev/null +++ b/libjava/testsuite/libjava.compile/pr25429.java @@ -0,0 +1,13 @@ +public class pr25429 +{ + private static final int CONST = 0; + class I { + public void f () { + switch(0) { + case CONST: + } + } + } + + public static void main(String[] args) { } +} diff --git a/libjava/testsuite/libjava.compile/rh175833.java b/libjava/testsuite/libjava.compile/rh175833.java new file mode 100644 index 0000000..6bdec57 --- /dev/null +++ b/libjava/testsuite/libjava.compile/rh175833.java @@ -0,0 +1,13 @@ +// Follow-on to PR 25429 +public class rh175833 +{ + private static final Object CONST = new Object(); + class I { + public Object f () { + // We need an accessor here. + return CONST; + } + } + + public static void main(String[] args) { } +} |