2010-03-17 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mcs / ilasm / codegen / SwitchInstr.cs
index 5b6178ee15bf9b3783e00f623051458753755927..810e779628db8ccd0489308ec2f6038daf7655a2 100644 (file)
@@ -32,8 +32,8 @@ namespace Mono.ILASM {
                         if (label_list != null) {
                                 label_array = new PEAPI.CILLabel[label_list.Count];
                                 foreach (object lab in label_list) {
-                                        if (lab is string) {
-                                                label_array[count++] = meth.GetLabelDef ((string) lab);
+                                        if (lab is LabelInfo) {
+                                                label_array[count++] = ((LabelInfo)lab).Label;
                                         } else {                                                
                                                 throw new InternalErrorException ("offsets in switch statements.");
                                         }