Created
August 17, 2011 13:20
-
-
Save spouliot/1151513 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c | |
index 00aaf45..1bdcc5c 100644 | |
--- a/mono/mini/aot-compiler.c | |
+++ b/mono/mini/aot-compiler.c | |
@@ -2735,7 +2735,12 @@ add_wrappers (MonoAotCompile *acfg) | |
MonoType *t; | |
MonoClass *klass; | |
- g_assert (method->flags & METHOD_ATTRIBUTE_STATIC); | |
+ /* this cannot be enforced by the C# compiler so we must give the user some warning before aborting */ | |
+ if (!(method->flags & METHOD_ATTRIBUTE_STATIC)) { | |
+ g_warning ("AOT restriction: Method '%s' must be static since it is decorated with [MonoPInvokeCallback]. See http://ios.xamarin.com/Documentation/Limitations#Reverse_Callbacks", | |
+ mono_method_full_name (method, TRUE)); | |
+ exit (1); | |
+ } | |
g_assert (sig->param_count == 1); | |
g_assert (sig->params [0]->type == MONO_TYPE_CLASS && !strcmp (mono_class_from_mono_type (sig->params [0])->name, "Type")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment