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

Side by Side Diff: pkg/analyzer/lib/src/error/codes.dart

Issue 2992243002: Add a test to ensure that error codes are not being missed and add missed error codes (Closed)
Patch Set: Created 3 years, 4 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
OLDNEW
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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 1091
1092 /** 1092 /**
1093 * Temporary error to work around dartbug.com/28515. 1093 * Temporary error to work around dartbug.com/28515.
1094 * 1094 *
1095 * We cannot yet properly summarize function-typed parameters with generic 1095 * We cannot yet properly summarize function-typed parameters with generic
1096 * arguments, so to prevent confusion, we produce an error for any such 1096 * arguments, so to prevent confusion, we produce an error for any such
1097 * constructs (regardless of whether summaries are in use). 1097 * constructs (regardless of whether summaries are in use).
1098 * 1098 *
1099 * TODO(paulberry): remove this once dartbug.com/28515 is fixed. 1099 * TODO(paulberry): remove this once dartbug.com/28515 is fixed.
1100 */ 1100 */
1101 static const GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED = 1101 static const CompileTimeErrorCode GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED =
1102 const CompileTimeErrorCode( 1102 const CompileTimeErrorCode(
1103 'GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED', 1103 'GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED',
1104 "Analysis of generic function typed parameters is not yet supported.", 1104 "Analysis of generic function typed parameters is not yet supported.",
1105 "Try using an explicit typedef, or changing type parameters to " 1105 "Try using an explicit typedef, or changing type parameters to "
1106 "`dynamic`."); 1106 "`dynamic`.");
1107 1107
1108 /** 1108 /**
1109 * 7.2 Getters: It is a compile-time error if a class has both a getter and a 1109 * 7.2 Getters: It is a compile-time error if a class has both a getter and a
1110 * method with the same name. 1110 * method with the same name.
1111 * 1111 *
(...skipping 3873 matching lines...) Expand 10 before | Expand all | Expand 10 after
4985 ErrorType.COMPILE_TIME_ERROR, 4985 ErrorType.COMPILE_TIME_ERROR,
4986 'NOT_INSTANTIATED_BOUND', 4986 'NOT_INSTANTIATED_BOUND',
4987 "Type parameter bound types must be instantiated.", 4987 "Type parameter bound types must be instantiated.",
4988 "Try adding type arguments."); 4988 "Try adding type arguments.");
4989 4989
4990 /* 4990 /*
4991 * TODO(brianwilkerson) Make the TOP_LEVEL_ error codes be errors rather than 4991 * TODO(brianwilkerson) Make the TOP_LEVEL_ error codes be errors rather than
4992 * hints and then clean up the function _errorSeverity in 4992 * hints and then clean up the function _errorSeverity in
4993 * test/src/task/strong/strong_test_helper.dart. 4993 * test/src/task/strong/strong_test_helper.dart.
4994 */ 4994 */
4995 /* TODO(leafp) Delete most of these. 4995 /* TODO(leafp) Delete most of these.
4996 */ 4996 */
4997 static const StrongModeCode TOP_LEVEL_CYCLE = const StrongModeCode( 4997 static const StrongModeCode TOP_LEVEL_CYCLE = const StrongModeCode(
4998 ErrorType.HINT, 4998 ErrorType.HINT,
4999 'TOP_LEVEL_CYCLE', 4999 'TOP_LEVEL_CYCLE',
5000 "The type of '{0}' can't be inferred because it depends on itself through the cycle: {1}.", 5000 "The type of '{0}' can't be inferred because it depends on itself through the cycle: {1}.",
5001 "Try adding an explicit type to one or more of the variables in the cycle in order to break the cycle."); 5001 "Try adding an explicit type to one or more of the variables in the cycle in order to break the cycle.");
5002 5002
5003 static const StrongModeCode TOP_LEVEL_FUNCTION_LITERAL_BLOCK = 5003 static const StrongModeCode TOP_LEVEL_FUNCTION_LITERAL_BLOCK =
5004 const StrongModeCode( 5004 const StrongModeCode(
5005 ErrorType.HINT, 5005 ErrorType.HINT,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
5055 * created from the optional [correction] template. 5055 * created from the optional [correction] template.
5056 */ 5056 */
5057 const StrongModeCode(ErrorType type, String name, String message, 5057 const StrongModeCode(ErrorType type, String name, String message,
5058 [String correction]) 5058 [String correction])
5059 : type = type, 5059 : type = type,
5060 super('STRONG_MODE_$name', message, correction); 5060 super('STRONG_MODE_$name', message, correction);
5061 5061
5062 @override 5062 @override
5063 ErrorSeverity get errorSeverity => type.severity; 5063 ErrorSeverity get errorSeverity => type.severity;
5064 } 5064 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/analysis_options/error/option_codes.dart ('k') | pkg/analyzer/test/test_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698