Bugzilla – Bug 321169
[GMCS] Runtime screams about invalid IL in generic code
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by nazgul@omega.pl 2006-05-17 13:35:53 MST ---- 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: ---- Additional Comments From miguel@ximian.com 2006-07-15 16:25:57 MST ---- Another verifier bug. ---- Additional Comments From lupus@ximian.com 2007-01-18 12:23:34 MST ---- Fixed in svn, thanks for the test case. Unknown operating system unknown. Setting to default OS "Other".