Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart |
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart |
index 851a4ee69047ad753d280cbedd668fa751bf81b3..154d448b4c6d2a5a10ab104577d9a32dc5f21e30 100644 |
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart |
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart |
@@ -1635,9 +1635,28 @@ part of lib; |
class A {}'''); |
computeLibrarySourceErrors(librarySource); |
assertErrors(sourceB, [CompileTimeErrorCode.DUPLICATE_DEFINITION]); |
+ assertNoErrors(librarySource); |
verify([librarySource, sourceA, sourceB]); |
} |
+ void test_duplicateDefinition_inPart() { |
+ Source librarySource = addNamedSource( |
+ "/lib.dart", |
+ r''' |
+library test; |
+part 'a.dart'; |
+class A {}'''); |
+ Source sourceA = addNamedSource( |
+ "/a.dart", |
+ r''' |
+part of test; |
+class A {}'''); |
+ computeLibrarySourceErrors(librarySource); |
+ assertErrors(sourceA, [CompileTimeErrorCode.DUPLICATE_DEFINITION]); |
+ assertNoErrors(librarySource); |
+ verify([librarySource, sourceA]); |
+ } |
+ |
void test_duplicateDefinition_catch() { |
Source source = addSource(r''' |
main() { |