Recover from invalid constraint syntax
authorMarek Safar <marek.safar@gmail.com>
Thu, 13 Jan 2011 16:24:26 +0000 (16:24 +0000)
committerMarek Safar <marek.safar@gmail.com>
Thu, 13 Jan 2011 16:24:26 +0000 (16:24 +0000)
mcs/errors/cs1001-5.cs [new file with mode: 0644]
mcs/mcs/cs-parser.jay

diff --git a/mcs/errors/cs1001-5.cs b/mcs/errors/cs1001-5.cs
new file mode 100644 (file)
index 0000000..b8dc58e
--- /dev/null
@@ -0,0 +1,7 @@
+// CS1001: Unexpected symbol `{', expecting identifier
+// Line: 6
+
+public class SomeClass {
+       public void SomeMethod<T>() where
+       {}
+}
index 6a9e1929176e1a8a4986a19798e5fb98fe262f97..3cb0479048a35d9c6aea2320f58ea725bd51d26c 100644 (file)
@@ -4318,6 +4318,11 @@ opt_type_parameter_constraints_clauses
          {
                $$ = $1;
          }
+       | error
+        {
+               Error_SyntaxError (yyToken);
+               $$ = null;
+        }
        ;
 
 type_parameter_constraints_clauses