diff --git a/NETGenerator/NETGenerator.cs b/NETGenerator/NETGenerator.cs index 0ff24f21c..536b15d6b 100644 --- a/NETGenerator/NETGenerator.cs +++ b/NETGenerator/NETGenerator.cs @@ -6976,7 +6976,7 @@ namespace PascalABCCompiler.NETGenerator is_addr = true; ITypeNode ctn = real_parameters[i].type; TypeInfo ti = helper.GetTypeReference(ctn); - + //(ssyy) moved up ITypeNode tn2 = parameters[i].type; ICompiledTypeNode ctn2 = tn2 as ICompiledTypeNode; @@ -6986,7 +6986,7 @@ namespace PascalABCCompiler.NETGenerator bool box_awaited = (ctn2 != null && ctn2.compiled_type == TypeFactory.ObjectType || tn2.IsInterface) && !(real_parameters[i] is SemanticTree.INullConstantNode) && (ctn3.is_value_type || ctn3.is_generic_parameter); - if (ti.clone_meth != null && ti.tp != null && ti.tp.IsValueType && !box_awaited && !parameters[i].is_const) + if (ti != null && ti.clone_meth != null && ti.tp != null && ti.tp.IsValueType && !box_awaited && !parameters[i].is_const) is_dot_expr = true; is_comp_gen = CheckForCompilerGenerated(real_parameters[i]); real_parameters[i].visit(this);