[Mono-bugs] [Bug 78673][Min] New - [G]MCS doesn't stop on error CS0246

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jun 19 11:08:24 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 adrinael at adrinael.net.

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

--- shadow/78673	2006-06-19 11:08:24.000000000 -0400
+++ shadow/78673.tmp.14378	2006-06-19 11:08:24.000000000 -0400
@@ -0,0 +1,73 @@
+Bug#: 78673
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: adrinael at adrinael.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [G]MCS doesn't stop on error CS0246
+
+Description of Problem:
+
+Testcase:
+
+public class foo
+{
+  private unexistingclassname field = null;
+}
+
+
+Compiling that generates:
+
+missing.cs(3,11): error CS0246: The type or namespace name
+`unexistingclassname' could not be found. Are you missing a using directive
+or an assembly reference?
+
+(which is correct output)
+
+and after that prints:
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+  at Mono.CSharp.FieldExpr..ctor (System.Reflection.FieldInfo fi, Location
+l) [0x00000] 
+  at Mono.CSharp.FieldExpr..ctor (System.Reflection.FieldInfo fi, Location
+l, Boolean in_initializer) [0x00000] 
+  at Mono.CSharp.FieldBase.ResolveInitializer () [0x00000] 
+  at Mono.CSharp.ClassOrStruct.DefineFieldInitializers () [0x00000] 
+  at Mono.CSharp.ClassOrStruct.Define () [0x00000] 
+  at Mono.CSharp.RootContext.DefineTypes () [0x00000] 
+  at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000] 
+  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] 
+
+
+
+Steps to reproduce the problem:
+1. Write above code to a file
+2. Compile with gmcs or mcs (happens with both)
+
+
+Actual Results:
+
+Above printout; nullreference exception.
+
+Expected Results:
+
+Only the error message.
+
+How often does this happen? 
+
+Always.
+
+Additional Information:
+
+svn HEAD from 2006-06-18 is the version used.


More information about the mono-bugs mailing list