Bugzilla – Bug 317289
[PATCH] CS0658 is not reported
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by marek.safar@seznam.cz 2005-02-24 09:31:05 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: Compile sample. Steps to reproduce the problem: using System; [class:Serializable] public class C { public static void Main () {} } Actual Results: error CS8025: Parsing error Expected Results: CS0658: 'class' is not a recognized attribute location. ---- Additional Comments From atsushi@ximian.com 2005-08-23 14:21:21 MST ---- Created an attachment (id=167464) proposed fix ---- Additional Comments From atsushi@ximian.com 2005-08-23 14:22:40 MST ---- With the attached patch, the output is: $ mono ../../svn/mcs/mcs/mcs.exe 72968.cs syntax error, got token `CLASS' 72968.cs(5,2): warning CS0658: 'class' is not a recognized attribute location. All attributes in this attribute section will be ignored. Compilation succeeded - 1 warning(s) Is there any way to surpress "syntax error" line? ---- Additional Comments From miguel@ximian.com 2005-08-23 15:59:11 MST ---- The only way of eliminating the error is to add CLASS to the grammar so it vecomes an acceptable way of parsing the input ---- Additional Comments From atsushi@ximian.com 2005-08-23 17:45:03 MST ---- Ok, but if in that way we have to list all the keywords up such as struct, int, unsafe... it will mess cs-parser.jay. Maybe this fix is better as a compromised solution. ---- Additional Comments From marek.safar@seznam.cz 2007-02-18 10:53:27 MST ---- Fixed in SVN. Imported an attachment (id=167464) Unknown operating system unknown. Setting to default OS "Other".