Skip to content

Commit

Permalink
* java/lang/natClass.cc (_Jv_IsAssignableFrom): Primitive TYPEs can
Browse files Browse the repository at this point in the history
	not be assigned to Object.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38505 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
bryce committed Dec 28, 2000
1 parent 7e15618 commit 680abc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libjava/java/lang/natClass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,8 @@ _Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface, int method_idx)
jboolean
_Jv_IsAssignableFrom (jclass target, jclass source)
{
if (target == &ObjectClass
|| source == target
if (source == target
|| (target == &ObjectClass && !source->isPrimitive())
|| (source->ancestors != NULL
&& source->ancestors[source->depth - target->depth] == target))
return true;
Expand Down

0 comments on commit 680abc8

Please sign in to comment.