[Mono-bugs] [Bug 67992][Nor] New - When the identifier is forgotten, MCS raises an undiserable exception.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 11 Oct 2004 13:49:11 -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 felipe.lessa@gmail.com.


--- shadow/67992	2004-10-11 13:49:11.000000000 -0400
+++ shadow/67992.tmp.20958	2004-10-11 13:49:11.000000000 -0400
@@ -0,0 +1,64 @@
+Bug#: 67992
+Product: Mono: Compilers
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Debian GNU/Linux Unstable+Experimental as of 09 October
+Status: NEW   
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: felipe.lessa@gmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: When the identifier is forgotten, MCS raises an undiserable exception.
+Description of Problem:
+When you forget then identifier of a variable in a method declaration (e.g.
+"ref index" instead of "ref int index"), MCS should give only "error
+CS1041: Identifier expected", but it also raises an exception of type
+Steps to reproduce the problem:
+1. Create a method with a reference passed argument, but without the
+identifier of its type.
+2. Try to access a list using this argument as the index.
+3. Voilą, MCS raises a NullReferenceException.
+Actual Results:
+The error *and* the exception.
+Expected Results:
+Only the error CS1041.
+How often does this happen? 
+As I don't have a large test case, I could only test it on my current mono
+Additional Information:
+$ mcs --version
+Mono C# compiler version
+$ mono --version
+Mono JIT compiler version 1.0.1, (C) 2002-2004 Novell, Inc and
+Contributors. www.go-mono.com
+        TLS:           normal
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV      : normal
+        Globalization: ICU
+$ dpkg -l mono\* | grep -e ^i
+ii  mono           1.0.1-1        The Mono .NET development environment
+ii  mono-assemblie 1.0.1-1        architecture specific files for Mono/.NET as
+ii  mono-assemblie 1.0.1-1        the Mono .NET class libraries
+ii  mono-common    1.0.1-1        common files for the Mono CLI runtimes
+ii  mono-gac       1.0.1-1        Mono GAC Tool
+ii  mono-jay       1.0.1-1        LALR(1) parser generator oriented to Java/.N
+ii  mono-jit       1.0.1-1        fast CLI (.NET/Mono) JIT compiler
+ii  mono-mcs       1.0.1-1        the Mono C# compiler
+ii  mono-utils     1.0.1-1        Mono utilities
+ii  mono-xsp       1.0-3          simple web server to run ASP.NET application