}
}
+ [System.Diagnostics.DebuggerDisplay("{DisplayDebugInfo()}")]
class ReferenceContainer : ElementTypeSpec
{
ReferenceContainer (TypeSpec element)
- : base (MemberKind.Class, element, null) // TODO: Kind.Class is most likely wrong
+ : base (MemberKind.ByRef, element, null)
{
}
}
}
+ string DisplayDebugInfo()
+ {
+ return "ref " + GetSignatureForError();
+ }
+
public override MetaType GetMetaInfo ()
{
if (info == null) {
return info;
}
+ public override string GetSignatureForError ()
+ {
+ return Element.GetSignatureForError ();
+ }
+
public static ReferenceContainer MakeType (ModuleContainer module, TypeSpec element)
{
+ if (element.Kind == MemberKind.ByRef)
+ throw new ArgumentException ();
+
ReferenceContainer pc;
if (!module.ReferenceTypesCache.TryGetValue (element, out pc)) {
pc = new ReferenceContainer (element);