Cause
This error occurs if you attempt to define a constant with the value null and you do not include a type specification. Every constant must have a defined type, and if no type is specified, the compiler assumes the type of the constant expression. However, in the case of null, no type can be assumed.
The following code fragment is an example of this error when defining a method constant.
constants NullName = null; // error, no type defined
Action
Specify the type of the constant, as shown in the following example.
constants NullName : String = null;