[Mono-bugs] [Bug 52499][Wis] New - Compiling a program with CS0110 results in a nullref

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Dec 2003 14:03:46 -0500 (EST)


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 bmaurer@users.sf.net.

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

--- shadow/52499	2003-12-23 14:03:46.000000000 -0500
+++ shadow/52499.tmp.4295	2003-12-23 14:03:46.000000000 -0500
@@ -0,0 +1,37 @@
+Bug#: 52499
+Product: Mono/Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Compiling a program with CS0110 results in a nullref
+
+public class T {
+	public const int a = b + 1;
+	public const int b = a + 1;
+
+	public static void Main()
+	{
+	}
+}
+
+we get a nullref:
+
+Unhandled Exception: System.NullReferenceException: Object reference not 
+set to
+an instance of an object.
+   at Mono.CSharp.Const.LookupConstantValue()
+   at Mono.CSharp.TypeContainer.EmitConstants()
+   at Mono.CSharp.RootContext.EmitCode()
+   at Mono.CSharp.Driver.MainDriver(String[] args)
+   at Mono.CSharp.Driver.Main(String[] args)