[docs] Enable documentation for mini.
[mono.git] / mono / mini / mini-native-types.c
index 6e461b806b461d133a7ecd56912a48c49d441354..9732a3f94fc5e29b76c8651bb17710ccfe0e18a7 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * magic-types.c: intrinsics for variable sized int/floats
+/**
+ * \file
+ * intrinsics for variable sized int/floats
  *
  * Author:
  *   Rodrigo Kumpera (kumpera@gmail.com)
@@ -411,8 +412,9 @@ mono_class_is_magic_float (MonoClass *klass)
                MonoClassField *value_field = mono_class_get_field_from_name (klass, "v");
                g_assert (value_field);
                MonoType *t = mono_field_get_type (value_field);
-               g_assert (t->type == mini_native_type_replace_type (&klass->byval_arg)->type);
-
+               MonoType *native = mini_native_type_replace_type (&klass->byval_arg);
+               if (t->type != native->type)
+                       g_error ("Assembly used for native types '%s' doesn't match this runtime, %s is mapped to %s, expecting %s.\n", klass->image->name, klass->name, mono_type_full_name (t), mono_type_full_name (native));
                return TRUE;
        }
        return FALSE;