verify.cc (is_assignable_from_slow): If source is an interface, we must also check...
authorPer Bothner <per@bothner.com>
Thu, 24 Jan 2002 20:02:21 +0000 (12:02 -0800)
committerPer Bothner <bothner@gcc.gnu.org>
Thu, 24 Jan 2002 20:02:21 +0000 (12:02 -0800)
* verify.cc (is_assignable_from_slow): If source is an interface,
we must also check the superclass.

From-SVN: r49189

libjava/ChangeLog
libjava/verify.cc

index 210c09af094fb4199d5807d0b22d72fbe668aaf1..cb48b1bf8ff2a7cd43b8edc82083c41c419b2539 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 8627de571c3869af0de14b7e8d86c41d408d76cf..3b033c748d9504ad192c99ccf6941c07b559be09 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;