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

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

Issue 2662483003: Better error message for missing async with await (Closed)
Patch Set: Add a period at the end of the sentence Created 3 years, 10 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
« no previous file with comments | « pkg/analysis_server/test/services/correction/fix_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4524 matching lines...) Expand 10 before | Expand all | Expand 10 after
4535 "Undefined name '{0}'.", 4535 "Undefined name '{0}'.",
4536 "Try correcting the name to one that is defined, or " 4536 "Try correcting the name to one that is defined, or "
4537 "defining the name."); 4537 "defining the name.");
4538 4538
4539 /** 4539 /**
4540 * If the identifier is 'await', be helpful about it. 4540 * If the identifier is 'await', be helpful about it.
4541 */ 4541 */
4542 static const StaticWarningCode UNDEFINED_IDENTIFIER_AWAIT = 4542 static const StaticWarningCode UNDEFINED_IDENTIFIER_AWAIT =
4543 const StaticWarningCode( 4543 const StaticWarningCode(
4544 'UNDEFINED_IDENTIFIER_AWAIT', 4544 'UNDEFINED_IDENTIFIER_AWAIT',
4545 "Undefined name 'await'.", 4545 "Undefined name 'await' in function body not marked with 'async'.",
4546 "Try correcting the name to one that is defined, " 4546 "Try correcting the name to one that is defined, "
4547 "defining the name, or " 4547 "defining the name, or "
4548 "adding 'async' to the enclosing function body."); 4548 "adding 'async' to the enclosing function body.");
4549 4549
4550 /** 4550 /**
4551 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, 4551 * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>,
4552 * <i>1<=i<=l</i>, must have a corresponding named parameter in the set 4552 * <i>1<=i<=l</i>, must have a corresponding named parameter in the set
4553 * {<i>p<sub>n+1</sub></i> &hellip; <i>p<sub>n+k</sub></i>} or a static 4553 * {<i>p<sub>n+1</sub></i> &hellip; <i>p<sub>n+k</sub></i>} or a static
4554 * warning occurs. 4554 * warning occurs.
4555 * 4555 *
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
4927 * created from the optional [correction] template. 4927 * created from the optional [correction] template.
4928 */ 4928 */
4929 const StrongModeCode(ErrorType type, String name, String message, 4929 const StrongModeCode(ErrorType type, String name, String message,
4930 [String correction]) 4930 [String correction])
4931 : type = type, 4931 : type = type,
4932 super('STRONG_MODE_$name', message, correction); 4932 super('STRONG_MODE_$name', message, correction);
4933 4933
4934 @override 4934 @override
4935 ErrorSeverity get errorSeverity => type.severity; 4935 ErrorSeverity get errorSeverity => type.severity;
4936 } 4936 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/correction/fix_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698