Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java

Issue 10703046: Issue 3753. Support for @deprecated annotation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Analyze for @deprecated all invocable elements Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 type resolver. 11 * {@link ErrorCode}s for type resolver.
12 */ 12 */
13 public enum TypeErrorCode implements ErrorCode { 13 public enum TypeErrorCode implements ErrorCode {
14 ASSERT_BOOL("assert requires 'bool' expression or '() -> bool' function"), 14 ASSERT_BOOL("assert requires 'bool' expression or '() -> bool' function"),
15 ASSERT_NUMBER_ARGUMENTS(ErrorSeverity.ERROR, "assert requires exactly one argu ment"), 15 ASSERT_NUMBER_ARGUMENTS(ErrorSeverity.ERROR, "assert requires exactly one argu ment"),
16 ASSERT_IS_STATEMENT(ErrorSeverity.ERROR, "assert is a statement, it cannot be used as an expression"), 16 ASSERT_IS_STATEMENT(ErrorSeverity.ERROR, "assert is a statement, it cannot be used as an expression"),
17 CANNOT_ASSIGN_TO("cannot assign to '%s'"), 17 CANNOT_ASSIGN_TO("cannot assign to '%s'"),
18 CANNOT_BE_RESOLVED("cannot resolve %s", true), 18 CANNOT_BE_RESOLVED("cannot resolve %s", true),
19 CANNOT_OVERRIDE_TYPED_MEMBER("cannot override %s of %s because %s is not assig nable to %s"), 19 CANNOT_OVERRIDE_TYPED_MEMBER("cannot override %s of %s because %s is not assig nable to %s"),
20 CANNOT_OVERRIDE_METHOD_DEFAULT_VALUE("cannot override method '%s', default val ue doesn't match '%s'"), 20 CANNOT_OVERRIDE_METHOD_DEFAULT_VALUE("cannot override method '%s', default val ue doesn't match '%s'"),
21 CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE("cannot override %s of %s because %s is not a subtype of %s"), 21 CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE("cannot override %s of %s because %s is not a subtype of %s"),
22 CYCLIC_REFERENCE_TO_TYPE_VARIABLE( 22 CYCLIC_REFERENCE_TO_TYPE_VARIABLE(
23 "Invalid type expression, cyclic reference to type variable '%s'"), 23 "Invalid type expression, cyclic reference to type variable '%s'"),
24 DEPRECATED_ELEMENT("'%s' is deprecated"),
24 DEFAULT_CONSTRUCTOR_TYPES( 25 DEFAULT_CONSTRUCTOR_TYPES(
25 "Constructor '%s' in '%s' has parameters types (%s), doesn't match '%s' in '%s' with (%s)"), 26 "Constructor '%s' in '%s' has parameters types (%s), doesn't match '%s' in '%s' with (%s)"),
26 DUPLICATE_NAMED_ARGUMENT("Named parameter argument already provided as positio nal argument"), 27 DUPLICATE_NAMED_ARGUMENT("Named parameter argument already provided as positio nal argument"),
27 CASE_EXPRESSION_SHOULD_BE_INT_STRING(ErrorSeverity.ERROR, 28 CASE_EXPRESSION_SHOULD_BE_INT_STRING(ErrorSeverity.ERROR,
28 "Case expression should be compiler-time constant of type 'int' or 'String ', '%s' found"), 29 "Case expression should be compiler-time constant of type 'int' or 'String ', '%s' found"),
29 CASE_EXPRESSIONS_SHOULD_BE_SAME_TYPE(ErrorSeverity.ERROR, 30 CASE_EXPRESSIONS_SHOULD_BE_SAME_TYPE(ErrorSeverity.ERROR,
30 "All case expressions should be compiler-time constants of the same type - 'int' or 'String'. '%s' expected but '%s' found"), 31 "All case expressions should be compiler-time constants of the same type - 'int' or 'String'. '%s' expected but '%s' found"),
31 EXPECTED_POSITIONAL_ARGUMENT("Expected positional argument of type %s before n amed arguments"), 32 EXPECTED_POSITIONAL_ARGUMENT("Expected positional argument of type %s before n amed arguments"),
32 EXTRA_ARGUMENT("extra argument"), 33 EXTRA_ARGUMENT("extra argument"),
33 FIELD_HAS_NO_GETTER("Field '%s' has no getter"), 34 FIELD_HAS_NO_GETTER("Field '%s' has no getter"),
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 @Override 116 @Override
116 public SubSystem getSubSystem() { 117 public SubSystem getSubSystem() {
117 return SubSystem.STATIC_TYPE; 118 return SubSystem.STATIC_TYPE;
118 } 119 }
119 120
120 @Override 121 @Override
121 public boolean needsRecompilation() { 122 public boolean needsRecompilation() {
122 return this.needsRecompilation; 123 return this.needsRecompilation;
123 } 124 }
124 } 125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698