[Mono-bugs] [Bug 72061][Wis] New - mcs throw System.NullReferenceException.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 1 Feb 2005 09:53:26 -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 mei@work.email.ne.jp.

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

--- shadow/72061	2005-02-01 09:53:26.000000000 -0500
+++ shadow/72061.tmp.15950	2005-02-01 09:53:26.000000000 -0500
@@ -0,0 +1,55 @@
+Bug#: 72061
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mei@work.email.ne.jp               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs throw System.NullReferenceException.
+
+Test code.
+
+class X 
+{
+	const ulong [] x = new ulong[] {};
+}
+
+Steps to reproduce the problem:
+1. save test code as xxx.cs and compile it.
+
+Actual Results:
+
+xxx.cs(3) error CS0133: Arrays can not be constant
+
+Unhandled Exception: System.NullReferenceException: Object reference not 
+set to an instance of a
+n object
+in <0x003e3> Mono.CSharp.Const:LookupConstantValue (object&)
+in <0x0001a> Mono.CSharp.Const:Emit ()
+in <0x00080> Mono.CSharp.TypeContainer:EmitConstants ()
+in <0x00434> Mono.CSharp.TypeContainer:EmitType ()
+in <0x0038c> Mono.CSharp.RootContext:EmitCode ()
+in <0x00b75> Mono.CSharp.Driver:MainDriver (string[])
+in <0x0000f> Mono.CSharp.Driver:Main (string[])
+
+
+Expected Results:
+
+xxx.cs(3) error CS0133: Arrays can not be constant
+
+How often does this happen? 
+
+Always.
+
+Additional Information:
+
+SVN 39924.