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 /** |
11 * {@link ErrorCode}s for resolver. | 11 * {@link ErrorCode}s for resolver. |
12 */ | 12 */ |
13 public enum ResolverErrorCode implements ErrorCode { | 13 public enum ResolverErrorCode implements ErrorCode { |
14 BLACK_LISTED_EXTENDS("'%s' can not be used as superclass"), | 14 BLACK_LISTED_EXTENDS("'%s' can not be used as superclass"), |
15 BLACK_LISTED_IMPLEMENTS("'%s' can not be used as superinterface"), | 15 BLACK_LISTED_IMPLEMENTS("'%s' can not be used as superinterface"), |
16 BREAK_LABEL_RESOLVES_TO_CASE_OR_DEFAULT("break label resolves to case or defau
lt statement"), | 16 BREAK_LABEL_RESOLVES_TO_CASE_OR_DEFAULT("break label resolves to case or defau
lt statement"), |
17 BUILT_IN_IDENTIFIER_AS_IMPORT_PREFIX("Build-in identifier '%s' cannot be used
as a import prefix"), | 17 BUILT_IN_IDENTIFIER_AS_IMPORT_PREFIX("Build-in identifier '%s' cannot be used
as a import prefix"), |
18 BUILT_IN_IDENTIFIER_AS_TYPE("Build-in identifier '%s' cannot be used as a type
annotation"), | 18 BUILT_IN_IDENTIFIER_AS_TYPE("Build-in identifier '%s' cannot be used as a type
annotation"), |
19 CANNOT_ACCESS_FIELD_IN_INIT("Cannot access an instance field in an initializer
expression"), | 19 CANNOT_ACCESS_FIELD_IN_INIT("Cannot access an instance field in an initializer
expression"), |
20 CANNOT_ACCESS_METHOD(ErrorSeverity.WARNING, "Cannot access private method '%s'
"), | 20 CANNOT_ACCESS_METHOD(ErrorSeverity.WARNING, "Cannot access private method '%s'
"), |
21 CANNOT_ACCESS_OUTER_LABEL("Cannot access label %s declared in an outer functio
n"), | 21 CANNOT_ACCESS_OUTER_LABEL("Cannot access label %s declared in an outer functio
n"), |
22 CANNOT_ASSIGN_TO_FINAL("cannot assign value to final variable \"%s\"."), | 22 CANNOT_ASSIGN_TO_FINAL("cannot assign value to final variable \"%s\"."), |
23 CANNOT_ASSIGN_TO_METHOD("cannot assign value to method '%s'."), | 23 CANNOT_ASSIGN_TO_METHOD("cannot assign value to method '%s'."), |
24 CANNOT_BE_RESOLVED("cannot resolve %s"), | 24 CANNOT_BE_RESOLVED("cannot resolve %s"), |
25 // TODO(zundel): error message needs JUnit test - how to test #imports in juni
t? | 25 // TODO(zundel): error message needs JUnit test - how to test #imports in juni
t? |
26 CANNOT_BE_RESOLVED_LIBRARY("cannot resolve %s in library %s"), | 26 CANNOT_BE_RESOLVED_LIBRARY("cannot resolve %s in library %s"), |
27 CANNOT_CALL_FUNCTION_TYPE_ALIAS("Function type aliases cannot be called"), | 27 CANNOT_CALL_FUNCTION_TYPE_ALIAS("Function type aliases cannot be called"), |
28 // TODO(zundel): error message needs JUnit test - how to test #imports in juni
t? | 28 // TODO(zundel): error message needs JUnit test - how to test #imports in juni
t? |
29 CANNOT_CALL_LIBRARY_PREFIX("Library prefixes cannot be called"), | 29 CANNOT_CALL_LIBRARY_PREFIX("Library prefixes cannot be called"), |
30 CANNOT_DECLARE_NON_FACTORY_CONSTRUCTOR( | 30 CANNOT_DECLARE_NON_FACTORY_CONSTRUCTOR(ErrorSeverity.WARNING, |
31 "Cannot declare a non-factory named constructor of another class."), | 31 "Cannot declare a non-factory named constructor of another class."), |
32 CANNOT_HIDE_IMPORT_PREFIX("Cannot hide import prefix '%s'"), | 32 CANNOT_HIDE_IMPORT_PREFIX("Cannot hide import prefix '%s'"), |
33 CANNOT_INIT_STATIC_FIELD_IN_INITIALIZER("Cannot initialize a static field in a
n initializer list"), | 33 CANNOT_INIT_STATIC_FIELD_IN_INITIALIZER("Cannot initialize a static field in a
n initializer list"), |
34 CANNOT_OVERRIDE_INSTANCE_MEMBER("static member cannot override instance member
%s of %s"), | 34 CANNOT_OVERRIDE_INSTANCE_MEMBER("static member cannot override instance member
%s of %s"), |
35 CANNOT_OVERRIDE_METHOD_NUM_REQUIRED_PARAMS( | 35 CANNOT_OVERRIDE_METHOD_NUM_REQUIRED_PARAMS( |
36 "cannot override method %s from %s, wrong number of required parameters"), | 36 "cannot override method %s from %s, wrong number of required parameters"), |
37 CANNOT_OVERRIDE_METHOD_NAMED_PARAMS( | 37 CANNOT_OVERRIDE_METHOD_NAMED_PARAMS( |
38 "cannot override method %s, named parameters don't match"), | 38 "cannot override method %s, named parameters don't match"), |
39 CANNOT_RESOLVE_CONSTRUCTOR("cannot resolve constructor %s"), | 39 CANNOT_RESOLVE_CONSTRUCTOR("cannot resolve constructor %s"), |
40 CANNOT_RESOLVE_FIELD("cannot resolve field %s"), | 40 CANNOT_RESOLVE_FIELD("cannot resolve field %s"), |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 @Override | 233 @Override |
234 public SubSystem getSubSystem() { | 234 public SubSystem getSubSystem() { |
235 return SubSystem.RESOLVER; | 235 return SubSystem.RESOLVER; |
236 } | 236 } |
237 | 237 |
238 @Override | 238 @Override |
239 public boolean needsRecompilation() { | 239 public boolean needsRecompilation() { |
240 return true; | 240 return true; |
241 } | 241 } |
242 } | 242 } |
OLD | NEW |