| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 package com.google.dart.compiler.resolver; | 4 package com.google.dart.compiler.resolver; |
| 5 | 5 |
| 6 import com.google.dart.compiler.ErrorCode; | 6 import com.google.dart.compiler.ErrorCode; |
| 7 import com.google.dart.compiler.ErrorSeverity; | 7 import com.google.dart.compiler.ErrorSeverity; |
| 8 import com.google.dart.compiler.SubSystem; | 8 import com.google.dart.compiler.SubSystem; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 "super type %s does not have a default constructor"), | 50 "super type %s does not have a default constructor"), |
| 51 CANNOT_USE_INSTANCE_FIELD_IN_INSTANCE_FIELD_INITIALIZER( | 51 CANNOT_USE_INSTANCE_FIELD_IN_INSTANCE_FIELD_INITIALIZER( |
| 52 "Cannot use instance field in instance field initializer"), | 52 "Cannot use instance field in instance field initializer"), |
| 53 CANNOT_USE_THIS_IN_INSTANCE_FIELD_INITIALIZER("Cannot use 'this' in instance f
ield initializer"), | 53 CANNOT_USE_THIS_IN_INSTANCE_FIELD_INITIALIZER("Cannot use 'this' in instance f
ield initializer"), |
| 54 CANNOT_USE_TYPE("Cannot reference the type '%s' in this context"), | 54 CANNOT_USE_TYPE("Cannot reference the type '%s' in this context"), |
| 55 // TODO(zundel): error message needs JUnit test (reachable code?) | 55 // TODO(zundel): error message needs JUnit test (reachable code?) |
| 56 CANNOT_USE_TYPE_VARIABLE("Cannot reference the type variable '%s' in this cont
ext"), | 56 CANNOT_USE_TYPE_VARIABLE("Cannot reference the type variable '%s' in this cont
ext"), |
| 57 CIRCULAR_REFERENCE( | 57 CIRCULAR_REFERENCE( |
| 58 "Circular reference detected: compile-time constants cannot reference the
mselves."), | 58 "Circular reference detected: compile-time constants cannot reference the
mselves."), |
| 59 CONST_REQUIRES_VALUE("Constant fields must have an initial value"), | 59 CONST_REQUIRES_VALUE("Constant fields must have an initial value"), |
| 60 CONSTRUCTOR_CANNOT_BE_ABSTRACT("A constructor cannot be abstract"), | |
| 61 CONSTRUCTOR_CANNOT_BE_STATIC("A constructor cannot be static"), | 60 CONSTRUCTOR_CANNOT_BE_STATIC("A constructor cannot be static"), |
| 62 CONSTRUCTOR_CANNOT_HAVE_RETURN_TYPE("Generative constructors cannot have retur
n type"), | 61 CONSTRUCTOR_CANNOT_HAVE_RETURN_TYPE("Generative constructors cannot have retur
n type"), |
| 63 CONST_AND_NONCONST_CONSTRUCTOR("Cannot reference to non-const constructor."), | 62 CONST_AND_NONCONST_CONSTRUCTOR("Cannot reference to non-const constructor."), |
| 64 CONST_ARRAY_WITH_TYPE_VARIABLE("Const array literals cannot have a type variab
le as a type argument"), | 63 CONST_ARRAY_WITH_TYPE_VARIABLE("Const array literals cannot have a type variab
le as a type argument"), |
| 65 CONST_CLASS_WITH_INHERITED_NONFINAL_FIELDS( | 64 CONST_CLASS_WITH_INHERITED_NONFINAL_FIELDS( |
| 66 "Const class %s cannot have non-final, inherited field %s from class %s"), | 65 "Const class %s cannot have non-final, inherited field %s from class %s"), |
| 67 CONST_CLASS_WITH_NONFINAL_FIELDS("Const class %s cannot have non-final field %
s"), | 66 CONST_CLASS_WITH_NONFINAL_FIELDS("Const class %s cannot have non-final field %
s"), |
| 68 CONST_CONSTRUCTOR_CANNOT_HAVE_BODY("A const constructor cannot have a body"), | 67 CONST_CONSTRUCTOR_CANNOT_HAVE_BODY("A const constructor cannot have a body"), |
| 69 CONST_CONSTRUCTOR_MUST_CALL_CONST_SUPER("const constructor must call const sup
er constructor"), | 68 CONST_CONSTRUCTOR_MUST_CALL_CONST_SUPER("const constructor must call const sup
er constructor"), |
| 70 CONST_MAP_WITH_TYPE_VARIABLE("Const map literals cannot have a type variable a
s a type argument"), | 69 CONST_MAP_WITH_TYPE_VARIABLE("Const map literals cannot have a type variable a
s a type argument"), |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 FACTORY_CANNOT_BE_CONST("A factory cannot be const"), | 115 FACTORY_CANNOT_BE_CONST("A factory cannot be const"), |
| 117 FIELD_DOES_NOT_HAVE_A_GETTER(ErrorSeverity.WARNING, "Field does not have a get
ter"), | 116 FIELD_DOES_NOT_HAVE_A_GETTER(ErrorSeverity.WARNING, "Field does not have a get
ter"), |
| 118 FIELD_DOES_NOT_HAVE_A_SETTER(ErrorSeverity.WARNING, "Field does not have a set
ter"), | 117 FIELD_DOES_NOT_HAVE_A_SETTER(ErrorSeverity.WARNING, "Field does not have a set
ter"), |
| 119 FIELD_GETTER_SETTER_SAME_STATIC("Field's getter and setter should be both stat
ic or not static"), | 118 FIELD_GETTER_SETTER_SAME_STATIC("Field's getter and setter should be both stat
ic or not static"), |
| 120 FINAL_FIELD_MUST_BE_INITIALIZED("The final field %s must be initialized"), | 119 FINAL_FIELD_MUST_BE_INITIALIZED("The final field %s must be initialized"), |
| 121 FORMAL_PARAMETER_NAME_EXPECTED("Formal parameter name expected"), | 120 FORMAL_PARAMETER_NAME_EXPECTED("Formal parameter name expected"), |
| 122 // TODO(zundel): error message needs JUnit test - how to test #imports in juni
t? | 121 // TODO(zundel): error message needs JUnit test - how to test #imports in juni
t? |
| 123 ILLEGAL_ACCESS_TO_PRIVATE("'%s' is private and not defined in this library"), | 122 ILLEGAL_ACCESS_TO_PRIVATE("'%s' is private and not defined in this library"), |
| 124 // TODO(zundel): error message needs JUnit test - how to test #imports in juni
t? | 123 // TODO(zundel): error message needs JUnit test - how to test #imports in juni
t? |
| 125 ILLEGAL_ACCESS_TO_PRIVATE_MEMBER("\"%s\" refers to \"%s\" which is in a differ
ent library"), | 124 ILLEGAL_ACCESS_TO_PRIVATE_MEMBER("\"%s\" refers to \"%s\" which is in a differ
ent library"), |
| 126 ILLEGAL_CONSTRUCTOR_NO_DEFAULT_IN_INTERFACE( | |
| 127 "Illegal constructor declaration. No default clause in interface"), | |
| 128 ILLEGAL_FIELD_ACCESS_FROM_STATIC("Illegal access of instance field %s from sta
tic scope"), | 125 ILLEGAL_FIELD_ACCESS_FROM_STATIC("Illegal access of instance field %s from sta
tic scope"), |
| 129 ILLEGAL_METHOD_ACCESS_FROM_STATIC("Illegal access of instance method %s from s
tatic scope"), | 126 ILLEGAL_METHOD_ACCESS_FROM_STATIC("Illegal access of instance method %s from s
tatic scope"), |
| 130 INIT_FIELD_ONLY_IMMEDIATELY_SURROUNDING_CLASS( | 127 INIT_FIELD_ONLY_IMMEDIATELY_SURROUNDING_CLASS( |
| 131 "Only fields of immediately surrounding class can be initialized"), | 128 "Only fields of immediately surrounding class can be initialized"), |
| 132 INSTANCE_METHOD_FROM_INITIALIZER("Instance methods cannot be referenced from c
onstructor initializer"), | 129 INSTANCE_METHOD_FROM_INITIALIZER("Instance methods cannot be referenced from c
onstructor initializer"), |
| 133 INSTANCE_METHOD_FROM_REDIRECT("Instance methods cannot be referenced from cons
tructor redirects"), | 130 INSTANCE_METHOD_FROM_REDIRECT("Instance methods cannot be referenced from cons
tructor redirects"), |
| 134 INSTANCE_METHOD_FROM_STATIC("Instance methods cannot be referenced from static
methods"), | 131 INSTANCE_METHOD_FROM_STATIC("Instance methods cannot be referenced from static
methods"), |
| 135 INTERNAL_ERROR("internal error: %s"), | 132 INTERNAL_ERROR("internal error: %s"), |
| 136 INVALID_OVERRIDE_METADATA(ErrorSeverity.WARNING, "Method marked with @override
, but does not override any superclass element"), | 133 INVALID_OVERRIDE_METADATA(ErrorSeverity.WARNING, "Method marked with @override
, but does not override any superclass element"), |
| 137 INVALID_RETURN_IN_CONSTRUCTOR("Generative constructors cannot return arbitrary
expressions"), | 134 INVALID_RETURN_IN_CONSTRUCTOR("Generative constructors cannot return arbitrary
expressions"), |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 @Override | 240 @Override |
| 244 public SubSystem getSubSystem() { | 241 public SubSystem getSubSystem() { |
| 245 return SubSystem.RESOLVER; | 242 return SubSystem.RESOLVER; |
| 246 } | 243 } |
| 247 | 244 |
| 248 @Override | 245 @Override |
| 249 public boolean needsRecompilation() { | 246 public boolean needsRecompilation() { |
| 250 return true; | 247 return true; |
| 251 } | 248 } |
| 252 } | 249 } |
| OLD | NEW |