Bug 321656 (MONO78940) - [PARSER] Improve error message given when non-declaration statements are found at class scope
Summary: [PARSER] Improve error message given when non-declaration statements are foun...
Status: RESOLVED FIXED
Alias: MONO78940
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Marek Safar
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-24 23:20 UTC by Matt Hargett
Modified: 2008-10-10 10:58 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
code sample that gets compile error (761 bytes, text/plain)
2006-07-24 23:23 UTC, Thomas Wiest
Details
fixed.cs (863 bytes, text/plain)
2006-07-26 14:46 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:04:34 UTC


---- Reported by matt@use.net 2006-07-24 16:20:41 MST ----

Steps to reproduce the problem:
1.  try to compile attached program using gmcs

Actual Results:
generics.cs(13,4): error CS8025: Parsing error


Expected Results:
should compile and run with same results as specified in the book.



---- Additional Comments From matt@use.net 2006-07-24 16:23:15 MST ----

Created an attachment (id=170161)
code sample that gets compile error




---- Additional Comments From rharinath@novell.com 2006-07-26 07:05:05 MST ----

The attached code has executable code embedded in class scope.  Yep,
it would be preferable if the error message was better.



---- Additional Comments From kornelpal@gmail.com 2006-07-26 07:45:55 MST ----

For Matt: This code should not compile at all because it isn't valid 
C# code. Neither MS CSC 2.0 nor gmcs compiles it.

I attached a corrected source file that compiles and behaves as 
expected.



---- Additional Comments From kornelpal@gmail.com 2006-07-26 07:46:19 MST ----

Created an attachment (id=170162)
fixed.cs


Imported an attachment (id=170161)
Imported an attachment (id=170162)

Unknown operating system unknown. Setting to default OS "Other".

Comment 2 Marek Safar 2008-10-10 10:58:20 UTC
Fixed in SVN.