CheckedModeCompileTimeErrorCode class

The error codes used for compile time errors caused by constant evaluation that would throw an exception when run in checked mode. The client of the analysis engine is responsible for determining how these errors should be presented to the user (for example, a command-line compiler might elect to treat these errors differently depending whether it is compiling it "checked" mode).

Inheritance
  • Object
  • ErrorCode
  • CheckedModeCompileTimeErrorCode

Constructors

CheckedModeCompileTimeErrorCode(String name, { String message, { String correction, bool hasPublishedDocs })
Initialize a newly created error code to have the given name. The message associated with the error will be created from the given message template. The correction associated with the error will be created from the given correction template.
const

Properties

errorSeverity ErrorSeverity
The severity of the error.
read-only, override
type ErrorType
The type of the error.
read-only, override
correction → String
The template used to create the correction to be displayed for this error, or null if there is no correction information for this error. The correction should indicate how the user can fix the error.
final, inherited
hashCode → int
The hash code for this object.
read-only, inherited
hasPublishedDocs → bool
Return true if diagnostics with this code have documentation for them that has been published.
final, inherited
isUnresolvedIdentifier → bool
Whether this error is caused by an unresolved identifier.
final, inherited
message → String
The template used to create the message to be displayed for this error. The message should indicate what is wrong and why it is wrong.
final, inherited
name → String
The name of the error code.
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
uniqueName → String
The unique name of this error code.
read-only, inherited
url → String
Return a URL that can be used to access documentation for diagnostics with this code, or null if there is no published documentation.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Constants

CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH → const CheckedModeCompileTimeErrorCode
16.12.2 Const: It is a compile-time error if evaluation of a constant object results in an uncaught exception being thrown.
const CheckedModeCompileTimeErrorCode('CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH', 'A value of type '{0}' can't be assigned to the field '{1}', which ' 'has type &#…
CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH → const CheckedModeCompileTimeErrorCode
16.12.2 Const: It is a compile-time error if evaluation of a constant object results in an uncaught exception being thrown.
const CheckedModeCompileTimeErrorCode('CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH', 'A value of type '{0}' can't be assigned to a parameter of type ' ''{1}'.')
CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE → const CheckedModeCompileTimeErrorCode
7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not null and the interface of the class of o is not a subtype of the static type of the field v. [...]
const CheckedModeCompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 'The initializer type '{0}' can't be assigned to the field type ' ''{1}'.')
VARIABLE_TYPE_MISMATCH → const CheckedModeCompileTimeErrorCode
16.12.2 Const: It is a compile-time error if evaluation of a constant object results in an uncaught exception being thrown.
const CheckedModeCompileTimeErrorCode('VARIABLE_TYPE_MISMATCH', 'A value of type '{0}' can't be assigned to a variable of type ' ''{1}'.')