Bugzilla – Bug 316066
[PATCH] improve CS1520 error's reported location
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by jluke@cfl.rr.com 2004-09-19 15:30:48 MST ---- Given: static class T { static void Main () { } static Foo () // missing return type on purpose { } } mcs currently reports: $ mcs t.cs Foo and T t.cs(1) error CS1520: Class, struct, or interface method must have a return type Compilation failed: 1 error(s), 0 warnings I would think it much more helpful if it reported: $ mcs t.cs Foo and T t.cs(7) error CS1520: Class, struct, or interface method must have a return type Compilation failed: 1 error(s), 0 warnings Attching a two-liner to change from using the class location, to Constructor.Location in the error report and comment that Console.WriteLine that prints 'Foo and T' ---- Additional Comments From jluke@cfl.rr.com 2004-09-19 15:31:29 MST ---- Created an attachment (id=166808) proposed patch ---- Additional Comments From miguel@ximian.com 2004-09-20 13:14:14 MST ---- Thanks, applied to CVS Imported an attachment (id=166808) Unknown operating system unknown. Setting to default OS "Other".