| Index: compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
|
| diff --git a/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java b/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
|
| index 224e8195d1f6f04928013629a42e3e7630892bce..f69a6e230ccbe1ccb5769f415399bef4cbf8db39 100644
|
| --- a/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
|
| +++ b/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
|
| @@ -13,7 +13,7 @@ import com.google.dart.compiler.SubSystem;
|
| public enum TypeErrorCode implements ErrorCode {
|
| ABSTRACT_CLASS_WITHOUT_ABSTRACT_MODIFIER(
|
| "%s is an abstract class because it does not implement the inherited abstract members: %s"),
|
| - CANNOT_BE_RESOLVED("cannot resolve %s"),
|
| + CANNOT_BE_RESOLVED("cannot resolve %s", true),
|
| CANNOT_OVERRIDE_TYPED_MEMBER("cannot override %s of %s because %s is not assignable to %s"),
|
| CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE("cannot override %s of %s because %s is not a subtype of %s"),
|
| DEFAULT_CONSTRUCTOR_TYPES(
|
| @@ -28,18 +28,18 @@ public enum TypeErrorCode implements ErrorCode {
|
| INSTANTIATION_OF_CLASS_WITH_UNIMPLEMENTED_MEMBERS(
|
| "instantiation of class %s with the inherited abstract members: %s"),
|
| INTERFACE_HAS_NO_METHOD_NAMED("%s has no method named \"%s\""),
|
| - INTERNAL_ERROR("internal error: %s"),
|
| + INTERNAL_ERROR("internal error: %s", true),
|
| IS_STATIC_FIELD_IN("\"%s\" is a static field in \"%s\""),
|
| IS_STATIC_METHOD_IN("\"%s\" is a static method in \"%s\""),
|
| MEMBER_IS_A_CONSTRUCTOR("%s is a constructor in %s"),
|
| MISSING_ARGUMENT("missing argument of type %s"),
|
| MISSING_RETURN_VALUE("no return value; expected a value of type %s"),
|
| NO_SUCH_NAMED_PARAMETER("no such named parameter \"%s\" defined"),
|
| - NO_SUCH_TYPE("no such type \"%s\""),
|
| + NO_SUCH_TYPE("no such type \"%s\"", true),
|
| NOT_A_FUNCTION("\"%s\" is not a function"),
|
| NOT_A_MEMBER_OF("\"%s\" is not a member of %s"),
|
| NOT_A_METHOD_IN("\"%s\" is not a method in %s"),
|
| - NOT_A_TYPE("type \"%s\" expected, but \"%s\" found"),
|
| + NOT_A_TYPE("type \"%s\" expected, but \"%s\" found", true),
|
| OPERATOR_WRONG_OPERAND_TYPE("operand of \"%s\" must be assignable to \"%s\""),
|
| OVERRIDING_INHERITED_STATIC_MEMBER("overriding inherited static member %s of %s"),
|
| SETTER_RETURN_TYPE("Specified return type of setter '%s' is non-void"),
|
| @@ -52,22 +52,22 @@ public enum TypeErrorCode implements ErrorCode {
|
| VOID("expression does not yield a value"),
|
| WRONG_NUMBER_OF_TYPE_ARGUMENTS("%s: wrong number of type arguments (%d), Expected %d");
|
|
|
| - private final ErrorSeverity severity;
|
| private final String message;
|
| + private final boolean needsRecompilation;
|
|
|
| /**
|
| - * Initialize a newly created error code to have the given message and WARNING severity.
|
| + * Initialize a newly created error code to have the given message.
|
| */
|
| private TypeErrorCode(String message) {
|
| - this(ErrorSeverity.WARNING, message);
|
| + this(message, false);
|
| }
|
|
|
| /**
|
| - * Initialize a newly created error code to have the given severity and message.
|
| + * Initialize a newly created error code to have the given message and compilation flag.
|
| */
|
| - private TypeErrorCode(ErrorSeverity severity, String message) {
|
| - this.severity = severity;
|
| + private TypeErrorCode(String message, boolean needsRecompilation) {
|
| this.message = message;
|
| + this.needsRecompilation = needsRecompilation;
|
| }
|
|
|
| @Override
|
| @@ -77,11 +77,16 @@ public enum TypeErrorCode implements ErrorCode {
|
|
|
| @Override
|
| public ErrorSeverity getErrorSeverity() {
|
| - return severity;
|
| + return ErrorSeverity.WARNING;
|
| }
|
|
|
| @Override
|
| public SubSystem getSubSystem() {
|
| return SubSystem.STATIC_TYPE;
|
| }
|
| +
|
| + @Override
|
| + public boolean needsRecompilation() {
|
| + return this.needsRecompilation;
|
| + }
|
| }
|
|
|