- added stdio.h include
[cacao.git] / typeinfo.c
index ec68ff270d0f8ada25aac7afbdbe992e3d55c3d0..2a6a0a3330686fee0c22d428892df01de6a97387 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Edwin Steiner
 
-   $Id: typeinfo.c 697 2003-12-07 12:45:27Z edwin $
+   $Id: typeinfo.c 698 2003-12-07 13:42:47Z edwin $
 
 */
 
@@ -160,14 +160,14 @@ typeinfo_is_assignable(typeinfo *value,typeinfo *dest)
     if (!cls && !dest->typeclass)
         return true;
 
-    /* the null type can be assigned to any type */
-    if (TYPEINFO_IS_NULLTYPE(*value))
-        return true;
-
     /* primitive and reference types are not assignment compatible. */
     if (!cls || !dest->typeclass)
         return false;
 
+    /* the null type can be assigned to any type */
+    if (TYPEINFO_IS_NULLTYPE(*value))
+        return true;
+
     if (dest->typeclass->flags & ACC_INTERFACE) {
         /* We are assigning to an interface type. */
         return merged_implements_interface(cls,value->merged,