Don't report duplicate error when error recovery fails at eof
authorMarek Safar <marek.safar@gmail.com>
Thu, 11 Oct 2012 11:48:49 +0000 (12:48 +0100)
committerMarek Safar <marek.safar@gmail.com>
Sun, 14 Oct 2012 14:05:42 +0000 (15:05 +0100)
mcs/mcs/cs-parser.jay

index d0ac204bd7f6d10681d8c1d9118e40ddefa5de0e..3187dbaec83ca7c0cdde0c7597768f92cb43f06d 100644 (file)
@@ -6913,7 +6913,8 @@ public void parse ()
                }
                        
                if (e is yyParser.yyException) {
-                       report.Error (-25, lexer.Location, "Parsing error");
+                       if (report.Errors == 0)
+                               report.Error (-25, lexer.Location, "Parsing error");
                } else {
                        // Used by compiler-tester to test internal errors
                        if (yacc_verbose_flag > 0 || e is FatalException)