Update to the latest IKVM.Reflection
[mono.git] / mcs / class / IKVM.Reflection / LocalVariableInfo.cs
index e7f056781c2ad321ae6a7627be6f070b0bdf2b81..9d565aa21396b8451b4c8d9d3b71e8a0e317221c 100644 (file)
@@ -25,18 +25,23 @@ using System;
 
 namespace IKVM.Reflection
 {
-       public sealed class LocalVariableInfo
+       public class LocalVariableInfo
        {
                private readonly int index;
                private readonly Type type;
                private readonly bool pinned;
                private readonly CustomModifiers customModifiers;
 
-               internal LocalVariableInfo(int index, Type type, bool pinned, CustomModifiers customModifiers)
+               internal LocalVariableInfo(int index, Type type, bool pinned)
                {
                        this.index = index;
                        this.type = type;
                        this.pinned = pinned;
+               }
+
+               internal LocalVariableInfo(int index, Type type, bool pinned, CustomModifiers customModifiers)
+                       : this(index, type, pinned)
+               {
                        this.customModifiers = customModifiers;
                }
 
@@ -59,5 +64,10 @@ namespace IKVM.Reflection
                {
                        return customModifiers;
                }
+
+               public override string ToString()
+               {
+                       return String.Format(pinned ? "{0} ({1}) (pinned)" : "{0} ({1})", type, index);
+               }
        }
 }