OSDN Git Service

* jcf-parse.c (read_class): Update identifier's class value if it
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jan 2003 17:15:36 +0000 (17:15 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jan 2003 17:15:36 +0000 (17:15 +0000)
changed during parsing.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62149 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 3b56a3a..4afcc94 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 2f03202..20dc3ff 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 ();