| 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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1450 * 0: the name of the type parameter | 1450 * 0: the name of the type parameter |
| 1451 */ | 1451 */ |
| 1452 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = | 1452 static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = |
| 1453 const CompileTimeErrorCode( | 1453 const CompileTimeErrorCode( |
| 1454 'INVALID_TYPE_ARGUMENT_IN_CONST_MAP', | 1454 'INVALID_TYPE_ARGUMENT_IN_CONST_MAP', |
| 1455 "Constant map literals can't include a type parameter as a type " | 1455 "Constant map literals can't include a type parameter as a type " |
| 1456 "argument, such as '{0}'.", | 1456 "argument, such as '{0}'.", |
| 1457 "Try replacing the type parameter with a different type."); | 1457 "Try replacing the type parameter with a different type."); |
| 1458 | 1458 |
| 1459 /** | 1459 /** |
| 1460 * The 'covariant' keyword was found in an inappropriate location. |
| 1461 */ |
| 1462 static const CompileTimeErrorCode INVALID_USE_OF_COVARIANT = |
| 1463 const CompileTimeErrorCode( |
| 1464 'INVALID_USE_OF_COVARIANT', |
| 1465 "The 'covariant' keyword can only be used for parameters in instance " |
| 1466 "methods or before non-final instance fields.", |
| 1467 "Try removing the 'covariant' keyword."); |
| 1468 |
| 1469 /** |
| 1460 * 14.2 Exports: It is a compile-time error if the compilation unit found at | 1470 * 14.2 Exports: It is a compile-time error if the compilation unit found at |
| 1461 * the specified URI is not a library declaration. | 1471 * the specified URI is not a library declaration. |
| 1462 * | 1472 * |
| 1463 * 14.1 Imports: It is a compile-time error if the compilation unit found at | 1473 * 14.1 Imports: It is a compile-time error if the compilation unit found at |
| 1464 * the specified URI is not a library declaration. | 1474 * the specified URI is not a library declaration. |
| 1465 * | 1475 * |
| 1466 * 14.3 Parts: It is a compile time error if the contents of the URI are not a | 1476 * 14.3 Parts: It is a compile time error if the contents of the URI are not a |
| 1467 * valid part declaration. | 1477 * valid part declaration. |
| 1468 * | 1478 * |
| 1469 * Parameters: | 1479 * Parameters: |
| (...skipping 3435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4905 * created from the optional [correction] template. | 4915 * created from the optional [correction] template. |
| 4906 */ | 4916 */ |
| 4907 const StrongModeCode(ErrorType type, String name, String message, | 4917 const StrongModeCode(ErrorType type, String name, String message, |
| 4908 [String correction]) | 4918 [String correction]) |
| 4909 : type = type, | 4919 : type = type, |
| 4910 super('STRONG_MODE_$name', message, correction); | 4920 super('STRONG_MODE_$name', message, correction); |
| 4911 | 4921 |
| 4912 @override | 4922 @override |
| 4913 ErrorSeverity get errorSeverity => type.severity; | 4923 ErrorSeverity get errorSeverity => type.severity; |
| 4914 } | 4924 } |
| OLD | NEW |