]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Report error on incorrect use of [ModuleInit]
authorJürg Billeter <j@bitron.ch>
Wed, 28 Apr 2010 15:03:04 +0000 (17:03 +0200)
committerJürg Billeter <j@bitron.ch>
Wed, 28 Apr 2010 15:03:04 +0000 (17:03 +0200)
Fixes bug 616805.

codegen/valaccodebasemodule.vala

index 6fdc6fde205b5e32d760083560216e763a9d2952..dc558c73030b31133043d475dd0fec3596354678 100644 (file)
@@ -352,6 +352,9 @@ public class Vala.CCodeBaseModule : CCodeModule {
                                                break;
                                        }
                                }
+                               if (!in_plugin) {
+                                       Report.error (context.module_init_method.source_reference, "[ModuleInit] requires a parameter of type `GLib.TypeModule'");
+                               }
                        }
 
                        var dbus_ns = root_symbol.scope.lookup ("DBus");