This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: compilation unit fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 01 Dec 2005 18:46:44 -0700
- Subject: [gcjx] Patch: FYI: compilation unit fix
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This fixes a dumb typo in the compilation unit code (stray semicolon)
and also changes it not to crash if a static import fails to find a
class.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* model/unit.cc (look_up_name): Handle case where static import
doesn't import a class.
(look_up_name): Fix typo.
Index: model/unit.cc
===================================================================
--- model/unit.cc (revision 107604)
+++ model/unit.cc (working copy)
@@ -106,7 +106,7 @@
model_import *imp = (*i).second;
resolve (&local_scope, imp);
model_class *klass = imp->get_class_declaration ();
- if (accessible_p (klass, context))
+ if (klass && accessible_p (klass, context))
{
imp->set_used ();
result.insert (klass);
@@ -183,8 +183,8 @@
(*i)->resolve (&local_scope);
(*i)->find_field (name, context, result);
- if (! result.empty ());
- return;
+ if (! result.empty ())
+ return;
}
}
}