jcf-parse.c (read_class): Update identifier's class value if it changed during parsing.
authorTom Tromey <tromey@redhat.com>
Thu, 30 Jan 2003 17:15:36 +0000 (17:15 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 30 Jan 2003 17:15:36 +0000 (17:15 +0000)
* jcf-parse.c (read_class): Update identifier's class value if it
changed during parsing.

From-SVN: r62149

gcc/java/ChangeLog
gcc/java/jcf-parse.c

index 3b56a3a30edfd35a9ee57e01bdc74bdd7728af28..4afcc9434321f40e4ec4a7f5b73f7ddaebf56441 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-30  Tom Tromey  <tromey@redhat.com>
+
+       * jcf-parse.c (read_class): Update identifier's class value if it
+       changed during parsing.
+
 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
 
        * Make-lang.in (po-generated): Find the targets in $(parsedir).
index 2f03202d5dd3dc5313b6e8c04148190955d8bcc0..20dc3ff9208e21b8b5cd2b141c0e44683e3ad90b 100644 (file)
@@ -516,6 +516,10 @@ read_class (tree name)
            read_zip_member(current_jcf,
                            current_jcf->zipd, current_jcf->zipd->zipf);
          jcf_parse (current_jcf);
+         /* Parsing might change the class, in which case we have to
+            put it back where we found it.  */
+         if (current_class != class && icv != NULL_TREE)
+           TREE_TYPE (icv) = current_class;
          class = current_class;
          java_pop_parser_context (0);
          java_parser_context_restore_global ();