**** Merged from MCS ****
[mono-project.git] / mcs / errors / CONTRIBUTORS_README
blob85ffec5c7f56c1ca7bea286a9726efdfd2eb237a
2 Mono MCS Errors.
4         Errors in the Mono C# compiler use the same codes as the
5         Microsoft C# compiler, the listing of the errors on it lives
6         in:
8         http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cscomp/html/vctbsCompilerErrorsSC0001ThroughSC9999.asp
10 * Format
12         Error tests are stored in files with the format:
14                 csXXXX.cs       for the first error.
15                 csXXXX-2.cs     for the second way to trigger the error.
16                 csXXXX-n.cs     for subsequent ways of triggering the error. 
17         
18         The file should start with two inline commented lines.
19         The first one contains a little description of the error, 
20         the second line declares the line where the error occurs.
22         You should not copy Microsoft's examples or documentation
23         text.  You will need to write your own.
24         
25         For example:
27         // cs0057.cs: Inconsistent accessibility. Parameter type is less accessible than operator.
28         // Line: 10
30         There should not be more than one error per tests.  Each test
31         should only contain one error.
33         Then you have to add the file to the CVS and commit it.
35         The next thing is to write a short text file with a little
36         description of what the error is and what it's necessary
37         to be done to solve it. 
38         
39 * Compiler options
41         If you need to run error test with some special option(s),
42         use following syntax in your error test file.
43         
44         // cs0193.cs: * or -> operator can only be applied to pointer types.
45         // Line: 9
46         // Compiler options: -unsafe        
48 * Dependencies
50         In case that your error test depends on the library or other C# file.
51         Create separate file with same name as your error test name except
52         first two letters which are uppercased. And then add this file to
53         Makefile.
55 * Known errors
57         Many of the errors in this test suite are not tested for by MCS. To cope
58         with this, we have a list of failures, so that someone running the test
59         can know if they have caused any regressions.
60         
61         In this model there are two types of regressions:
62                 * Incorrect error -- When mcs emits an error, but it is different
63                   than the one CSC emits.
64                   
65                 * No error -- When mcs incorrectly compiles an invalid file.
66                 
67         `Incorrect error' regressions should be listed in mcs-expect-wrong-error.
68         `No error' regressiions should be listed in mcs-expect-no-error.
69         
70         If you fix a bug and thus remove a regression, be sure to remove the file
71         from the failures list!
73 * Errors not suported by Mono compiler
75         Here is a list of errors reported by csc 1.0, 1.1 and not supported by Mono.
76         Please add comment for every error.
77         
78         CS0580: Included in error CS1501 (not supported by csc 2.0)
79         CS0581: Included in error CS0117 (not supported by csc 2.0)