This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]