[Mono-bugs] [Bug 22004] New - parser may get confused with extern method declarations

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
16 Mar 2002 13:36:44 -0000


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 lupus@ximian.com.

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

--- shadow/22004	Sat Mar 16 08:36:44 2002
+++ shadow/22004.tmp.32555	Sat Mar 16 08:36:44 2002
@@ -0,0 +1,40 @@
+Bug#: 22004
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: parser may get confused with extern method declarations
+
+The following file won't compile with mcs:
+
+===============
+using System.Runtime.CompilerServices;
+
+public class String 
+{
+
+	[MethodImpl(MethodImplOptions.InternalCall)]
+	extern public String(char[] value, int startIndex, int length);
+
+}
+===============
+
+The error it gives (both on linux and windows) is:
+syntax error, expecting OPEN_BRACE COLON
+.\String.cs (7,56), Token:353   : Parsing error 
+
+It should expect a SEMICOLON, not a COLON.
+How that can happen from the grammar, I don't know. Maybe it's a bug in jay?
+
+lupus