Error_AttributeConstructorMismatch (Location);\r
return null;\r
}\r
+\r
+ //\r
+ // Now we perform some checks on the positional args as they\r
+ // cannot be null for a constructor which expects a parameter\r
+ // of type object\r
+ //\r
+\r
+ ParameterData pd = Invocation.GetParameterData (constructor);\r
+\r
+ for (int j = 0; j < pos_arg_count; ++j) {\r
+ Argument a = (Argument) pos_args [j];\r
+ \r
+ if (a.Expr is NullLiteral && pd.ParameterType (j) == TypeManager.object_type) {\r
+ Error_AttributeArgumentNotValid ();\r
+ return null;\r
+ }\r
+ }\r
\r
PropertyInfo [] prop_info_arr = new PropertyInfo [prop_infos.Count];\r
FieldInfo [] field_info_arr = new FieldInfo [field_infos.Count];\r
(ConstructorInfo) constructor, pos_values,\r
prop_info_arr, prop_values_arr,\r
field_info_arr, field_values_arr); \r
+\r
} catch (NullReferenceException) {\r
- Error_AttributeArgumentNotValid ();\r
+ // \r
+ // Don't know what to do here\r
+ //\r
} catch {\r
//\r
// Sample:\r