return MemberName.GetSignatureForError ();
}
+ public string GetSignatureForMetadata ()
+ {
+#if STATIC
+ var name = TypeNameParser.Escape (MemberName.Basename);
+
+ if (Parent is TypeDefinition) {
+ return Parent.GetSignatureForMetadata () + "+" + name;
+ }
+
+ if (Parent != null && Parent.MemberName != null)
+ return Parent.GetSignatureForMetadata () + "." + name;
+
+ return name;
+#else
+ throw new NotImplementedException ();
+#endif
+ }
+
public virtual void RemoveContainer (TypeContainer cont)
{
if (containers != null)
containers.Remove (cont);
- defined_names.Remove (cont.Basename);
+ var tc = Parent == Module ? Module : this;
+ tc.defined_names.Remove (cont.Basename);
}
public virtual void VerifyMembers ()
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 ());