| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 | 4 |
| 5 library analyzer.src.error.codes; | 5 library analyzer.src.error.codes; |
| 6 | 6 |
| 7 import 'package:analyzer/error/error.dart'; | 7 import 'package:analyzer/error/error.dart'; |
| 8 | 8 |
| 9 export 'package:analyzer/src/analysis_options/error/option_codes.dart'; | 9 export 'package:analyzer/src/analysis_options/error/option_codes.dart'; |
| 10 export 'package:analyzer/src/dart/error/hint_codes.dart'; | 10 export 'package:analyzer/src/dart/error/hint_codes.dart'; |
| (...skipping 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 */ | 2039 */ |
| 2040 static const CompileTimeErrorCode PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT = | 2040 static const CompileTimeErrorCode PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT = |
| 2041 const CompileTimeErrorCode( | 2041 const CompileTimeErrorCode( |
| 2042 'PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT', | 2042 'PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT', |
| 2043 "The name '{0}' refers to an import prefix, so it must be followed " | 2043 "The name '{0}' refers to an import prefix, so it must be followed " |
| 2044 "by '.'.", | 2044 "by '.'.", |
| 2045 "Try correcting the name to refer to something other than a prefix, or
" | 2045 "Try correcting the name to refer to something other than a prefix, or
" |
| 2046 "renaming the prefix."); | 2046 "renaming the prefix."); |
| 2047 | 2047 |
| 2048 /** | 2048 /** |
| 2049 * It is an error for a mixin to add a private name that conflicts with a | |
| 2050 * private name added by a superclass or another mixin. | |
| 2051 */ | |
| 2052 static const CompileTimeErrorCode PRIVATE_COLLISION_IN_MIXIN_APPLICATION = | |
| 2053 const CompileTimeErrorCode( | |
| 2054 'PRIVATE_COLLISION_IN_MIXIN_APPLICATION', | |
| 2055 "The private name {0}, defined by {1}, conflicts with the same name " | |
| 2056 "defined by {2}.", | |
| 2057 "Try removing {1} from the 'with' clause."); | |
| 2058 | |
| 2059 /** | |
| 2060 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named | 2049 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named |
| 2061 * optional parameter begins with an '_' character. | 2050 * optional parameter begins with an '_' character. |
| 2062 */ | 2051 */ |
| 2063 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = | 2052 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = |
| 2064 const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', | 2053 const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', |
| 2065 "Named optional parameters can't start with an underscore."); | 2054 "Named optional parameters can't start with an underscore."); |
| 2066 | 2055 |
| 2067 /** | 2056 /** |
| 2068 * 12.1 Constants: It is a compile-time error if the value of a compile-time | 2057 * 12.1 Constants: It is a compile-time error if the value of a compile-time |
| 2069 * constant expression depends on itself. | 2058 * constant expression depends on itself. |
| (...skipping 2884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4954 * created from the optional [correction] template. | 4943 * created from the optional [correction] template. |
| 4955 */ | 4944 */ |
| 4956 const StrongModeCode(ErrorType type, String name, String message, | 4945 const StrongModeCode(ErrorType type, String name, String message, |
| 4957 [String correction]) | 4946 [String correction]) |
| 4958 : type = type, | 4947 : type = type, |
| 4959 super('STRONG_MODE_$name', message, correction); | 4948 super('STRONG_MODE_$name', message, correction); |
| 4960 | 4949 |
| 4961 @override | 4950 @override |
| 4962 ErrorSeverity get errorSeverity => type.severity; | 4951 ErrorSeverity get errorSeverity => type.severity; |
| 4963 } | 4952 } |
| OLD | NEW |