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
8 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cscomp/html/vctbsCompilerErrorsSC0001ThroughSC9999.asp
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.
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.
27 // CS0057: Inconsistent accessibility. Parameter type is less accessible than operator.
30 ** Note 1: If your error or warning message does not contain source line
31 location use syntax `// Line : 0'
33 ** Note 2: Because in some special cases the error message can differ
34 between runtimes. The special syntax exists where you can specify message
39 // CS0057: Uknown error
40 // GMCS0057: Uknown error 2.0
44 There should not be more than one error per tests. Each test
45 should only contain one error.
47 Then you have to add the file to the SVN and commit it.
49 The next thing is to write a short text file with a little
50 description of what the error is and what it's necessary
51 to be done to solve it.
55 If you need to run error test with some special option(s),
56 use following syntax in your error test file.
58 // cs0193.cs: * or -> operator can only be applied to pointer types.
60 // Compiler options: -unsafe
64 In case that your error test depends on the library or other C# file.
65 Create separate file with same name as your error test name except
66 first two letters which are uppercased. And then add this file to
71 Many of the errors in this test suite are not tested for by MCS. To cope
72 with this, we have a list of failures, so that someone running the test
73 can know if they have caused any regressions.
75 In this model there are two types of regressions:
76 * Incorrect error -- When mcs emits an error, but it is different
77 than the one CSC emits.
79 * No error -- When mcs incorrectly compiles an invalid file.
81 `Incorrect error' regressions should be listed in mcs-expect-wrong-error.
82 `No error' regressiions should be listed in mcs-expect-no-error.
84 If you fix a bug and thus remove a regression, be sure to remove the file
85 from the failures list!
87 * Errors not suported by Mono compiler
89 Here is a list of errors reported by csc 1.0, 1.1 and not supported by Mono.
90 Please add comment for every error.
92 CS0134: not supported by csc 2.0
93 CS0576: not supported by csc 2.0
94 CS0580: Included in error CS1501 (not supported by csc 2.0)
95 CS0581: Included in error CS0117 (not supported by csc 2.0)
96 CS0654: not supported by csc 2.0