]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Allow TypeModule subclasses as parameter-type in module-init-method f59bb994b62e71d49b0152ca80dc9318869902f4
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 3 Jul 2018 20:00:41 +0000 (22:00 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 5 Jul 2018 13:26:08 +0000 (15:26 +0200)
Fixes https://gitlab.gnome.org/GNOME/vala/issues/648

codegen/valaccodebasemodule.vala

index 67aac9efb1b08480bdde39f0334b9d0386cd13d9..83ef3d43ba28924cd930e11358fafe55fe521ce7 100644 (file)
@@ -490,7 +490,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                        if (context.module_init_method != null) {
                                foreach (Parameter parameter in context.module_init_method.get_parameters ()) {
-                                       if (parameter.variable_type.data_type == type_module_type) {
+                                       if (parameter.variable_type.data_type.is_subtype_of (type_module_type)) {
                                                in_plugin = true;
                                                module_init_param_name = parameter.name;
                                                break;