From: Rico Tzschichholz Date: Tue, 3 Jul 2018 20:00:41 +0000 (+0200) Subject: codegen: Allow TypeModule subclasses as parameter-type in module-init-method X-Git-Tag: 0.41.90~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f59bb994b62e71d49b0152ca80dc9318869902f4;p=thirdparty%2Fvala.git codegen: Allow TypeModule subclasses as parameter-type in module-init-method Fixes https://gitlab.gnome.org/GNOME/vala/issues/648 --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index 67aac9efb..83ef3d43b 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -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;