1 We use negative numbers for the compiler, and leave the possitive
2 numbers to match the Microsoft numbers.
4 NOTE: I am now moving to use numbers above 6000 instead of negative
5 numbers, as they look nicer on the debugging output.
7 -1 An Primary Expression was parsed, when a Type was expected.
8 This happens because my parser knowledge is limited, and I
9 am not good at writing grammars. It is still an error,
10 but if I were smarter, I would have found a Bison/Yacc way
13 -2 Internal error, an interface is being defined inside an
14 interface (This should never happen).
16 -3 Constant type is not one of sbyte, byte, short, ushort, int,
17 uint, long, ulong, char, float, double, decimal, bool, string, enum
20 -5 A search for a name on a Type returned matches that contain
21 methods and non-methods. They have the same name, and I do
22 not know how this is possible to begin with.
24 -6 Generic internal compiler error.
26 -7 Internal compiler error/library error: no default constructor
27 for a built-in type. Ie, decimal (int 32)
29 -8 User-defined conversion cannot convert from or to object type.
31 -9 User-defined conversion cannot convert from or to an interface type.
33 -10 User-defined conversion cannot convert between types that derive
36 -12 More than one integral conversion exists for the type on a
39 -13 No return with a value found. Warning, since we currently
40 do not perform flow analysis, and can not tell whether a
41 ret is required or not.
43 -14 Invalid number passed to probe
45 -15 Can not locate default assembly path
47 -16 Can not use System.Enum.ToObject (type, ConstantValue) with
50 -17 A type has already been defined (try --nostdlib)
52 -18 Do not know how to generate debugging information for this platform.
54 -19 Can not find required utility function in the core libraries.
56 -20 Cannot find attribute type Blah (maybe you forgot to set the
57 usage using the AttributeUsage attribute ?).
59 -21 Bug in Microsoft compiler while applying named attribute for
60 StructLayout.CharSet value.
62 -22 Location of previous error
64 -23 .NET runtime error when encoding attributes whose constructor
65 takes an object, but an enumeration value that is boxed is
69 using System.ComponentModel;
70 [DefaultValue (CollectionChangeAction.Add)]
71 class X { static void Main () { } }
74 -24 .NET runtime bug when trying to set custom attributes on the
75 return type of a method
78 -25 Generic parse error
80 -26 Corlib compilation is not supported in MS.NET
82 -27 Attribute resolved to two different types
86 -29 Use -option instead of --option: to move people to the new
87 command line handling.
89 -30 This version of the runtime does not support making pinned local variables.
90 This code may cause errors on a runtime with a moving GC
92 -31 Internal compiler error during the method emit phase.
94 -32 Internal compiler error during parsing.
96 -33 Contravariant type parameters cannot be the return type.
98 -34 Contravariant type parameters cannot be used as type arguments.
100 -35 Covariant type parameters cannot be used as type arguments except
101 for inherited interfaces.
103 -36 Variant type parameters can only be used with interface and
106 -37 Contravariant type parameters cannot be byref method parameters.
108 -38 Covariant type parameters cannot be used as method parameters.
110 -39 Contravariant type parameters cannot be used in interface inheritance.
114 Errors that we have allocated that will have corresponding errors in
115 the Microsoft C# compiler:
117 -200 Constraints for class defined, but there is no parameter list.
119 -201 Class containing main method is generic.
121 -202 Can not use a type parameter in an attribute.
123 -203 Can not use type parameters as unmanaged types.
125 -204 yield statement in something which is not a method-body,
126 accessor-body or operator-body
128 -205 A method containing a yield statement is not IEnumerator.
130 -206 Return statement not allowed inside iterators.
132 -207 A parameter in an enumerator method contains out or ref
134 -208 Yield statement appears inside finally clause
136 -209 Yield statment appears in anonymous method.
138 -210 Fixed code not allowed inside iterators.
140 -211 Array expression passed to attribute is not unidimensional
142 -212 An Array creation expression is present, but the array is not
145 -213 This feature requires v2 support.
147 -214 Generic class can not have attribute as its parent class
149 -215 Taking the address of a parameter in an iterator is not allowed.
151 -216 Can not use a type parameters as base class
153 -217 Wrong number of type parameters
155 -218 Invalid constraints clause
157 -219 Type argument doesn't meet constraints.
159 -220 Cannot resolve constructed type
161 -221 params modifier present in anonymous method declaration
163 -222 yield statement only available in C# 2.0 mode