+ else if (method->flags & METHOD_ATTRIBUTE_STATIC) {
+ /*
+ * The method's class must implement an interface.
+ * However, no interfaces are allowed to have static methods.
+ * Thus, calling it should invariably lead to an exception.
+ */
+ MonoError error;
+ error_init (&error);
+ mono_cominterop_get_interface_missing_error (&error, method);
+ mono_mb_emit_exception_for_error (mb, &error);
+ mono_error_cleanup (&error);
+ }