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

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

Issue 2401783002: Report CompileTimeErrorCode.DUPLICATE_PART when not only URI, but even Source is the same. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | pkg/analyzer/lib/src/task/dart.dart » ('j') | pkg/analyzer/lib/src/task/dart.dart » ('J')
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 import 'package:analyzer/src/dart/element/element.dart'; 8 import 'package:analyzer/src/dart/element/element.dart';
9 9
10 /** 10 /**
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 * Parameters: 747 * Parameters:
748 * 0: the name of the duplicate entity 748 * 0: the name of the duplicate entity
749 */ 749 */
750 static const CompileTimeErrorCode DUPLICATE_DEFINITION = 750 static const CompileTimeErrorCode DUPLICATE_DEFINITION =
751 const CompileTimeErrorCode( 751 const CompileTimeErrorCode(
752 'DUPLICATE_DEFINITION', "The name '{0}' is already defined"); 752 'DUPLICATE_DEFINITION', "The name '{0}' is already defined");
753 753
754 /** 754 /**
755 * 18.3 Parts: It's a compile-time error if the same library contains two part 755 * 18.3 Parts: It's a compile-time error if the same library contains two part
756 * directives with the same URI. 756 * directives with the same URI.
757 *
758 * Parameters:
759 * 0: the URI of the duplicate part
760 */ 757 */
761 static const CompileTimeErrorCode DUPLICATE_PART = const CompileTimeErrorCode( 758 static const CompileTimeErrorCode DUPLICATE_PART =
762 'DUPLICATE_PART', 759 const CompileTimeErrorCode('DUPLICATE_PART', 'Duplicate part');
Brian Wilkerson 2016/10/06 22:14:11 I think the old message was better. I think it wou
763 "The library already contains a part with the uri '{0}'.");
764 760
765 /** 761 /**
766 * 7. Classes: It is a compile-time error if a class has an instance member 762 * 7. Classes: It is a compile-time error if a class has an instance member
767 * and a static member with the same name. 763 * and a static member with the same name.
768 * 764 *
769 * This covers the additional duplicate definition cases where inheritance has 765 * This covers the additional duplicate definition cases where inheritance has
770 * to be considered. 766 * to be considered.
771 * 767 *
772 * Parameters: 768 * Parameters:
773 * 0: the name of the class that has conflicting instance/static members 769 * 0: the name of the class that has conflicting instance/static members
(...skipping 4102 matching lines...) Expand 10 before | Expand all | Expand 10 after
4876 * Initialize a newly created error code to have the given [name]. 4872 * Initialize a newly created error code to have the given [name].
4877 */ 4873 */
4878 const TodoCode(String name) : super(name, "{0}"); 4874 const TodoCode(String name) : super(name, "{0}");
4879 4875
4880 @override 4876 @override
4881 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 4877 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
4882 4878
4883 @override 4879 @override
4884 ErrorType get type => ErrorType.TODO; 4880 ErrorType get type => ErrorType.TODO;
4885 } 4881 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/dart.dart » ('j') | pkg/analyzer/lib/src/task/dart.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698