This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
patch: libjava/verify.cc must check source superclass even if target is interface
- From: Per Bothner <per at bothner dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Thu, 24 Jan 2002 12:12:26 -0800
- Subject: patch: libjava/verify.cc must check source superclass even if target is interface
I checked in the following.
2002-01-24 Per Bothner <per@bothner.com>
* verify.cc (is_assignable_from_slow): If target is an interface,
we must still check the source's superclass before giving up.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
Index: verify.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/verify.cc,v
retrieving revision 1.25
diff -u -p -r1.25 verify.cc
--- verify.cc 2001/12/10 01:18:30 1.25
+++ verify.cc 2002/01/24 20:00:01
@@ -261,7 +261,9 @@ private:
if (is_assignable_from_slow (target, source->interfaces[i]))
return true;
}
- return false;
+ source = source->getSuperclass ();
+ if (source == NULL)
+ return false;
}
else if (target == &java::lang::Object::class$)
return true;