| 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 engine.error; | 5 library engine.error; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart' show AstNode; | 9 import 'ast.dart' show AstNode; |
| 10 import 'element.dart'; | 10 import 'element.dart'; |
| (...skipping 3266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3277 * implements the built-in class <i>Map<K, V></i> is allocated. | 3277 * implements the built-in class <i>Map<K, V></i> is allocated. |
| 3278 * | 3278 * |
| 3279 * @param numTypeArgument the number of provided type arguments | 3279 * @param numTypeArgument the number of provided type arguments |
| 3280 */ | 3280 */ |
| 3281 static const StaticTypeWarningCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS = | 3281 static const StaticTypeWarningCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS = |
| 3282 const StaticTypeWarningCode( | 3282 const StaticTypeWarningCode( |
| 3283 'EXPECTED_TWO_MAP_TYPE_ARGUMENTS', | 3283 'EXPECTED_TWO_MAP_TYPE_ARGUMENTS', |
| 3284 "Map literal requires exactly two type arguments or none, but {0} foun
d"); | 3284 "Map literal requires exactly two type arguments or none, but {0} foun
d"); |
| 3285 | 3285 |
| 3286 /** | 3286 /** |
| 3287 * 9 Functions: It is a static warning if the declared return type of a |
| 3288 * function marked async* may not be assigned to Stream. |
| 3289 */ |
| 3290 static const StaticTypeWarningCode ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE = |
| 3291 const StaticTypeWarningCode( |
| 3292 'ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE', |
| 3293 "Functions marked 'async*' must have a return type assignable to 'Stre
am'"); |
| 3294 |
| 3295 /** |
| 3296 * 9 Functions: It is a static warning if the declared return type of a |
| 3297 * function marked async may not be assigned to Future. |
| 3298 */ |
| 3299 static const StaticTypeWarningCode ILLEGAL_ASYNC_RETURN_TYPE = |
| 3300 const StaticTypeWarningCode( |
| 3301 'ILLEGAL_ASYNC_RETURN_TYPE', |
| 3302 "Functions marked 'async' must have a return type assignable to 'Futur
e'"); |
| 3303 |
| 3304 /** |
| 3305 * 9 Functions: It is a static warning if the declared return type of a |
| 3306 * function marked sync* may not be assigned to Iterable. |
| 3307 */ |
| 3308 static const StaticTypeWarningCode ILLEGAL_SYNC_GENERATOR_RETURN_TYPE = |
| 3309 const StaticTypeWarningCode( |
| 3310 'ILLEGAL_SYNC_GENERATOR_RETURN_TYPE', |
| 3311 "Functions marked 'sync*' must have a return type assignable to 'Itera
ble'"); |
| 3312 |
| 3313 /** |
| 3287 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. | 3314 * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. |
| 3288 * It is a static type warning if <i>T</i> does not have an accessible | 3315 * It is a static type warning if <i>T</i> does not have an accessible |
| 3289 * instance setter named <i>v=</i>. | 3316 * instance setter named <i>v=</i>. |
| 3290 * | 3317 * |
| 3291 * See [UNDEFINED_SETTER]. | 3318 * See [UNDEFINED_SETTER]. |
| 3292 */ | 3319 */ |
| 3293 static const StaticTypeWarningCode INACCESSIBLE_SETTER = | 3320 static const StaticTypeWarningCode INACCESSIBLE_SETTER = |
| 3294 const StaticTypeWarningCode('INACCESSIBLE_SETTER', ""); | 3321 const StaticTypeWarningCode('INACCESSIBLE_SETTER', ""); |
| 3295 | 3322 |
| 3296 /** | 3323 /** |
| (...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4994 * Initialize a newly created error code to have the given [name]. | 5021 * Initialize a newly created error code to have the given [name]. |
| 4995 */ | 5022 */ |
| 4996 const TodoCode(String name) : super(name, "{0}"); | 5023 const TodoCode(String name) : super(name, "{0}"); |
| 4997 | 5024 |
| 4998 @override | 5025 @override |
| 4999 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 5026 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 5000 | 5027 |
| 5001 @override | 5028 @override |
| 5002 ErrorType get type => ErrorType.TODO; | 5029 ErrorType get type => ErrorType.TODO; |
| 5003 } | 5030 } |
| OLD | NEW |