* verify.cc (is_assignable_from_slow): If source is an interface,
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Jan 2002 20:02:21 +0000 (20:02 +0000)
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Jan 2002 20:02:21 +0000 (20:02 +0000)
we must also check the superclass.

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

libjava/ChangeLog
libjava/verify.cc

index 210c09a..cb48b1b 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-24  Per Bothner  <per@bothner.com>
+
+       * verify.cc (is_assignable_from_slow): If source is an interface,
+       we must also check the the superclass.
+
 2002-01-24  Tom Tromey  <tromey@redhat.com>
 
        * gnu/awt/xlib/XToolkit.java (getPrintJob): New stub method.
index 8627de5..3b033c7 100644 (file)
@@ -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;