var imported = MemberDefinition as ImportedTypeDefinition;
if (imported != null && Kind != MemberKind.MissingType)
imported.DefineInterfaces (this);
-
}
return ifaces;
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 ()
public static readonly InternalType Namespace = new InternalType ("<namespace>");
public static readonly InternalType ErrorType = new InternalType ("<error>");
public static readonly InternalType VarOutType = new InternalType ("var out");
+ public static readonly InternalType ThrowExpr = new InternalType ("throw expression");
readonly string name;
public TypeSpec Element { get; private set; }
+ public override IList<TypeSpec> Interfaces {
+ set {
+ throw new NotSupportedException ();
+ }
+ }
+
bool ITypeDefinition.IsComImport {
get {
return false;
#endregion
+ public override void CheckObsoleteness (IMemberContext mc, Location loc)
+ {
+ Element.CheckObsoleteness (mc, loc);
+ }
+
public override ObsoleteAttribute GetAttributeObsolete ()
{
return Element.GetAttributeObsolete ();
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<TypeSpec> Interfaces {
+ get {
+ return BaseType.Interfaces;
+ }
+ }
+
public int Rank {
get {
return rank;
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);
}
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<TypeSpec> Interfaces {
+ get {
+ return null;
+ }
+ }
+
public override MetaType GetMetaInfo ()
{
if (info == null) {
state &= ~StateFlags.CLSCompliant_Undetected;
}
+ public override IList<TypeSpec> Interfaces {
+ get {
+ return null;
+ }
+ }
+
public override MetaType GetMetaInfo ()
{
if (info == null) {