[Mono-bugs] [Bug 78431][Wis] New - [GMCS] Runtime screams about invalid IL in generic code

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed May 17 13:35:54 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by nazgul at omega.pl.

http://bugzilla.ximian.com/show_bug.cgi?id=78431

--- shadow/78431	2006-05-17 13:35:53.000000000 -0400
+++ shadow/78431.tmp.32231	2006-05-17 13:35:53.000000000 -0400
@@ -0,0 +1,76 @@
+Bug#: 78431
+Product: Mono: Runtime
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: nazgul at omega.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] Runtime screams about invalid IL in generic code
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Compile and run
+
+
+  public class Pair <T> { 
+    public T fst; 
+    public T snd; 
+  }
+  
+  public class RList <T>  {
+    public class Nil : RList <T> {}
+    public class Zero : RList <T> { 
+      public RList <Pair <T> > arg;
+    }
+
+    static int _Length (RList <T> xs) {
+      if (xs is Zero)
+        return RList <Pair <T> >._Length (((Zero)xs).arg);
+      else
+        return 0;
+    }
+    public int Length  {
+      get { 
+        return _Length (this);
+      }
+    }    
+  }
+
+
+class M { 
+  public static void Main() {
+    int x = (new RList<object>.Nil()).Length;
+  }
+}
+
+
+Actual Results:
+Unhandled Exception: System.InvalidProgramException: Invalid IL code in
+RList`1:_Length (RList`1): IL_0016: call      0x0a000003
+
+
+in <0x00000> <unknown method>
+in <0x0000b> RList`1[System.Object]:get_Length ()
+in <0x00029> M:Main ()
+
+
+Expected Results:
+Clear run
+
+How often does this happen? 
+Always, it worked in mono 1.1.13
+
+Additional Information:


More information about the mono-bugs mailing list