[Mono-bugs] [Bug 76656][Cos] New - Confusing error message. Incorrect 'Expecting: ...'

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Nov 9 15:18:04 EST 2005


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 gonzalo at ximian.com.

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

--- shadow/76656	2005-11-09 15:18:04.000000000 -0500
+++ shadow/76656.tmp.11067	2005-11-09 15:18:04.000000000 -0500
@@ -0,0 +1,39 @@
+Bug#: 76656
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Cosmetic
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: gonzalo at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Confusing error message. Incorrect 'Expecting: ...'
+
+Try compiling this:
+--------------
+using System;
+
+class Test {
+        static void Main ()
+        {
+                string uri = "http://localhost/";
+                int default_port = (uri.StartsWith ("http://") ? 80 : -1;
+                if (default_port == -1)
+                        default_port = (uri.StartsWith ("https://") ? 443 : -1;
+        }
+}
+------------
+
+It fails, of course, bug MS says that it is waiting for a ')', while the
+error by mcs/gmcs is:
+syntax error, got token `SEMICOLON'
+bug.cs(7,59): error CS1002: Expecting `;'
+syntax error, got token `SEMICOLON'
+bug.cs(9,58): error CS1002: Expecting `;'


More information about the mono-bugs mailing list