return MemberName.GetSignatureForError ();
}
+ public string GetSignatureForMetadata ()
+ {
+#if STATIC
+ if (Parent is TypeDefinition) {
+ return Parent.GetSignatureForMetadata () + "+" + TypeNameParser.Escape (MemberName.Basename);
+ }
+
+ var sb = new StringBuilder ();
+ CreateMetadataName (sb);
+ return sb.ToString ();
+#else
+ throw new NotImplementedException ();
+#endif
+ }
+
public virtual void RemoveContainer (TypeContainer cont)
{
if (containers != null)
internal override void GenerateDocComment (DocumentationBuilder builder)
{
+ if (IsPartialPart)
+ return;
+
base.GenerateDocComment (builder);
foreach (var member in members)
//
// Sets .size to 1 for structs with no instance fields
//
- int type_size = Kind == MemberKind.Struct && first_nonstatic_field == null ? 1 : 0;
+ int type_size = Kind == MemberKind.Struct && first_nonstatic_field == null && !(this is StateMachine) ? 1 : 0;
var parent_def = Parent as TypeDefinition;
if (parent_def == null) {
return;
string class_indexer_name = null;
- has_normal_indexers = true;
//
// Check normal indexers for consistent name, explicit interface implementation
// indexers are ignored
//
foreach (var indexer in indexers) {
+ //
+ // FindMembers can return unfiltered full hierarchy names
+ //
+ if (indexer.DeclaringType != spec)
+ continue;
+
+ has_normal_indexers = true;
+
if (class_indexer_name == null) {
indexer_name = class_indexer_name = indexer.Name;
continue;
{
// for extern static method must be specified either DllImport attribute or MethodImplAttribute.
// We are more strict than csc and report this as an error because SRE does not allow emit that
- if ((ModFlags & Modifiers.EXTERN) != 0 && !is_external_implementation) {
+ if ((ModFlags & Modifiers.EXTERN) != 0 && !is_external_implementation && (OptAttributes == null || !OptAttributes.HasResolveError ())) {
if (this is Constructor) {
Report.Warning (824, 1, Location,
"Constructor `{0}' is marked `external' but has no external implementation specified", GetSignatureForError ());
get { return IsExplicitImpl || base.IsUsed; }
}
+ public override void SetConstraints (List<Constraints> constraints_list)
+ {
+ if (((ModFlags & Modifiers.OVERRIDE) != 0 || IsExplicitImpl)) {
+ Report.Error (460, Location,
+ "`{0}': Cannot specify constraints for overrides and explicit interface implementation methods",
+ GetSignatureForError ());
+ }
+
+ base.SetConstraints (constraints_list);
+ }
}
public abstract class MemberBase : MemberCore