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

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

Issue 2931893004: Report an error when a part-of refers to an unnamed library. (Closed)
Patch Set: Created 3 years, 6 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 4402 matching lines...) Expand 10 before | Expand all | Expand 10 after
4413 * 1: the non-matching actual library name from the "part of" declaration 4413 * 1: the non-matching actual library name from the "part of" declaration
4414 */ 4414 */
4415 static const StaticWarningCode PART_OF_DIFFERENT_LIBRARY = 4415 static const StaticWarningCode PART_OF_DIFFERENT_LIBRARY =
4416 const StaticWarningCode( 4416 const StaticWarningCode(
4417 'PART_OF_DIFFERENT_LIBRARY', 4417 'PART_OF_DIFFERENT_LIBRARY',
4418 "Expected this library to be part of '{0}', not '{1}'.", 4418 "Expected this library to be part of '{0}', not '{1}'.",
4419 "Try including a different part, or " 4419 "Try including a different part, or "
4420 "changing the name of the library in the part's part-of directive."); 4420 "changing the name of the library in the part's part-of directive.");
4421 4421
4422 /** 4422 /**
4423 * Parts: It is a static warning if the referenced part declaration
4424 * <i>p</i> names a library that does not have a library tag.
4425 *
4426 * Parameters:
4427 * 0: the URI of the expected library
4428 * 1: the non-matching actual library name from the "part of" declaration
4429 */
4430 static const StaticWarningCode PART_OF_UNNAMED_LIBRARY =
4431 const StaticWarningCode(
4432 'PART_OF_UNNAMED_LIBRARY',
4433 "Library is unnamed. Expected a URI not a library name '{0}' in the "
4434 "part-of directive.",
4435 "Try changing the part-of directive to a URI, or try including a"
4436 " different part.");
4437
4438 /**
4423 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> 4439 * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i>
4424 * is not a subtype of the type of <i>k</i>. 4440 * is not a subtype of the type of <i>k</i>.
4425 * 4441 *
4426 * Parameters: 4442 * Parameters:
4427 * 0: the name of the redirected constructor 4443 * 0: the name of the redirected constructor
4428 * 1: the name of the redirecting constructor 4444 * 1: the name of the redirecting constructor
4429 */ 4445 */
4430 static const StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = 4446 static const StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE =
4431 const StaticWarningCode( 4447 const StaticWarningCode(
4432 'REDIRECT_TO_INVALID_FUNCTION_TYPE', 4448 'REDIRECT_TO_INVALID_FUNCTION_TYPE',
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
5063 * created from the optional [correction] template. 5079 * created from the optional [correction] template.
5064 */ 5080 */
5065 const StrongModeCode(ErrorType type, String name, String message, 5081 const StrongModeCode(ErrorType type, String name, String message,
5066 [String correction]) 5082 [String correction])
5067 : type = type, 5083 : type = type,
5068 super('STRONG_MODE_$name', message, correction); 5084 super('STRONG_MODE_$name', message, correction);
5069 5085
5070 @override 5086 @override
5071 ErrorSeverity get errorSeverity => type.severity; 5087 ErrorSeverity get errorSeverity => type.severity;
5072 } 5088 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698