protected override bool CheckBase()
{
if ((ModFlags & Modifiers.STATIC) != 0) {
if (!parameters.IsEmpty) {
Report.Error (132, Location, "`{0}': The static constructor must be parameterless",
GetSignatureForError ());
return false;
}
// the rest can be ignored
return true;
}
// Check whether arguments were correct.
if (!DefineParameters (parameters))
return false;
if ((caching_flags & Flags.MethodOverloadsExist) != 0)
Parent.MemberCache.CheckExistingMembersOverloads (this, parameters);
if (Parent.PartialContainer.Kind == MemberKind.Struct && parameters.IsEmpty) {
Report.Error (568, Location,
"Structs cannot contain explicit parameterless constructors");
return false;
}
CheckProtectedModifier ();
return true;
}