push_function (asyncfunc);
+ // FIXME partial code duplication with CCodeMethodModule.visit_method
+ unowned Class? cl = m.parent_symbol as Class;
+ if (cl != null) {
+ if (m.binding == MemberBinding.INSTANCE && !(m is CreationMethod)
+ && m.base_method == null && m.base_interface_method == null) {
+ create_type_check_statement (m, new VoidType (), cl, true, "self");
+ }
+ }
+ foreach (Parameter param in m.get_parameters ()) {
+ if (param.ellipsis || param.params_array) {
+ break;
+ }
+
+ if (param.direction == ParameterDirection.IN) {
+ unowned TypeSymbol? t = param.variable_type.type_symbol;
+ if (t != null && (t.is_reference_type () || param.variable_type.is_real_struct_type ())) {
+ create_type_check_statement (m, new VoidType (), t, !param.variable_type.nullable, get_ccode_name (param));
+ }
+ }
+ }
+
// logic copied from valaccodemethodmodule
if (m.overrides || (m.base_interface_method != null && !m.is_abstract && !m.is_virtual)) {
Method base_method;