protected bool DefineParameters (ParametersCompiled parameters)
{
if (!parameters.Resolve (this))
return false;
bool error = false;
for (int i = 0; i < parameters.Count; ++i) {
Parameter p = parameters [i];
if (p.HasDefaultValue && (IsExplicitImpl || this is Operator || (this is Indexer && parameters.Count == 1)))
p.Warning_UselessOptionalParameter (Report);
if (p.CheckAccessibility (this))
continue;
TypeSpec t = parameters.Types [i];
Report.SymbolRelatedToPreviousError (t);
if (this is Indexer)
Report.Error (55, Location,
"Inconsistent accessibility: parameter type `{0}' is less accessible than indexer `{1}'",
TypeManager.CSharpName (t), GetSignatureForError ());
else if (this is Operator)
Report.Error (57, Location,
"Inconsistent accessibility: parameter type `{0}' is less accessible than operator `{1}'",
TypeManager.CSharpName (t), GetSignatureForError ());
else
Report.Error (51, Location,
"Inconsistent accessibility: parameter type `{0}' is less accessible than method `{1}'",
TypeManager.CSharpName (t), GetSignatureForError ());
error = true;
}
return !error;
}