X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Ftypespec.cs;h=696bde556c820ad00f9d206bac897e80c10ee470;hb=9667b4ef59cf8ce2617dadebb08fe1b85f1ac33d;hp=81894f06c762ea1d6146e2e9d99905b2d3a7f4e1;hpb=3ff51a5d1f0f5fbbab6ba050a4e44c409d589e47;p=mono.git diff --git a/mcs/mcs/typespec.cs b/mcs/mcs/typespec.cs index 81894f06c76..696bde556c8 100644 --- a/mcs/mcs/typespec.cs +++ b/mcs/mcs/typespec.cs @@ -109,7 +109,6 @@ namespace Mono.CSharp var imported = MemberDefinition as ImportedTypeDefinition; if (imported != null && Kind != MemberKind.MissingType) imported.DefineInterfaces (this); - } return ifaces; @@ -547,7 +546,15 @@ namespace Mono.CSharp public string GetSignatureForErrorIncludingAssemblyName () { - return string.Format ("{0} [{1}]", GetSignatureForError (), MemberDefinition.DeclaringAssembly.FullName); + var imported = MemberDefinition.DeclaringAssembly as ImportedAssemblyDefinition; + + var location = imported != null ? + System.IO.Path.GetFullPath (imported.Location) : + ((MemberCore)MemberDefinition).Location.NameFullPath; + + return string.Format ("{0} [{1} -- {2}]", GetSignatureForError (), + MemberDefinition.DeclaringAssembly.FullName, + location); } protected virtual string GetTypeNameSignature () @@ -1595,6 +1602,12 @@ namespace Mono.CSharp public TypeSpec Element { get; private set; } + public override IList Interfaces { + set { + throw new NotSupportedException (); + } + } + bool ITypeDefinition.IsComImport { get { return false; @@ -1769,13 +1782,19 @@ namespace Mono.CSharp readonly int rank; readonly ModuleContainer module; - private ArrayContainer (ModuleContainer module, TypeSpec element, int rank) + ArrayContainer (ModuleContainer module, TypeSpec element, int rank) : base (MemberKind.ArrayType, element, null) { this.module = module; this.rank = rank; } + public override IList Interfaces { + get { + return BaseType.Interfaces; + } + } + public int Rank { get { return rank; @@ -1918,7 +1937,6 @@ namespace Mono.CSharp if (!module.ArrayTypesCache.TryGetValue (key, out ac)) { ac = new ArrayContainer (module, element, rank); ac.BaseType = module.Compiler.BuiltinTypes.Array; - ac.Interfaces = ac.BaseType.Interfaces; module.ArrayTypesCache.Add (key, ac); } @@ -1934,11 +1952,17 @@ namespace Mono.CSharp class ReferenceContainer : ElementTypeSpec { - private ReferenceContainer (TypeSpec element) + ReferenceContainer (TypeSpec element) : base (MemberKind.Class, element, null) // TODO: Kind.Class is most likely wrong { } + public override IList Interfaces { + get { + return null; + } + } + public override MetaType GetMetaInfo () { if (info == null) { @@ -1969,6 +1993,12 @@ namespace Mono.CSharp state &= ~StateFlags.CLSCompliant_Undetected; } + public override IList Interfaces { + get { + return null; + } + } + public override MetaType GetMetaInfo () { if (info == null) {