[Mono-bugs] [Bug 47681][Nor] New - Invalid generated IL

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 16 Aug 2003 15:58:22 -0400 (EDT)


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 jlaban@wanadoo.fr.

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

--- shadow/47681	2003-08-16 15:58:22.000000000 -0400
+++ shadow/47681.tmp.15269	2003-08-16 15:58:22.000000000 -0400
@@ -0,0 +1,50 @@
+Bug#: 47681
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jlaban@wanadoo.Fr               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Invalid generated IL 
+
+The following code generates invalid IL code. 
+
+(MS.NET throws System.InvalidProgramException and mono is displaying ** 
+ERROR **: Invalid IL code at IL0000 in 00 .TestClass:TestMethod (): 
+IL_0000: newobj    0x06000001)
+
+Here is the code :
+
+
+using System;
+
+class TestClass : IDisposable 
+{
+	static void Main(string[] args)
+	{
+		new TestClass().TestMethod();
+	}
+
+	public void Dispose()
+	{
+	}
+
+	public void TestMethod()
+	{
+		using(IDisposable test = new TestClass())
+		{
+			while(false)
+			{
+			}
+		}
+	}
+}