Fix bug #367114.
[mono.git] / mcs / ilasm / codegen / CatchBlock.cs
index 08a35e5da33678952457466dbf72cd465ab0a97f..ecc61b384e65d795f736c1ad4470f4bf894e88b2 100644 (file)
@@ -15,12 +15,12 @@ namespace Mono.ILASM {
 
         public class CatchBlock : ISehClause {
 
-                private IClassRef class_ref;
+                private BaseTypeRef type_ref;
                 private HandlerBlock handler_block;
 
-                public CatchBlock (IClassRef class_ref)
+                public CatchBlock (BaseTypeRef type_ref)
                 {
-                        this.class_ref = class_ref;
+                        this.type_ref = type_ref;
                 }
 
                 public void SetHandlerBlock (HandlerBlock hb)
@@ -31,12 +31,12 @@ namespace Mono.ILASM {
                 public PEAPI.HandlerBlock Resolve (CodeGen code_gen, MethodDef method)
                 {
                         PEAPI.CILLabel from = handler_block.GetFromLabel (code_gen, method);
-                        PEAPI.CILLabel to = handler_block.GetFromLabel (code_gen, method);
+                        PEAPI.CILLabel to = handler_block.GetToLabel (code_gen, method);
                         PEAPI.Catch katch;
 
-                        class_ref.Resolve (code_gen);
+                        type_ref.Resolve (code_gen);
 
-                        katch = new PEAPI.Catch (class_ref.PeapiClass, from, to);
+                        katch = new PEAPI.Catch (type_ref.PeapiType, from, to);
 
                         return katch;
                 }