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 a8b21c9894860280119ed29c2eee7ebdb869c521..e8f7e11f19e915afe08ea9160608a8c5e050f691 100644 |
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart |
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart |
@@ -5273,6 +5273,105 @@ f() { |
verify([source]); |
} |
+ test_privateCollisionInMixinApplication_mixinAndMixin() async { |
+ resetWith(options: new AnalysisOptionsImpl()..strongMode = true); |
+ addNamedSource( |
+ '/lib1.dart', |
+ ''' |
+class A { |
+ int _x; |
+} |
+ |
+class B { |
+ int _x; |
+} |
+'''); |
+ Source source = addSource(''' |
+import 'lib1.dart'; |
+class C extends Object with A, B {} |
+'''); |
+ await computeAnalysisResult(source); |
+ assertErrors(source, [ |
+ CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION, |
+ StrongModeCode.INVALID_FIELD_OVERRIDE |
+ ]); |
+ verify([source]); |
+ } |
+ |
+ test_privateCollisionInMixinApplication_mixinAndMixin_indirect() async { |
+ resetWith(options: new AnalysisOptionsImpl()..strongMode = true); |
+ addNamedSource( |
+ '/lib1.dart', |
+ ''' |
+class A { |
+ int _x; |
+} |
+ |
+class B { |
+ int _x; |
+} |
+'''); |
+ Source source = addSource(''' |
+import 'lib1.dart'; |
+class C extends Object with A {} |
+class D extends C with B {} |
+'''); |
+ await computeAnalysisResult(source); |
+ assertErrors( |
+ source, [CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION]); |
+ verify([source]); |
+ } |
+ |
+ test_privateCollisionInMixinApplication_superclassAndMixin() async { |
+ resetWith(options: new AnalysisOptionsImpl()..strongMode = true); |
+ addNamedSource( |
+ '/lib1.dart', |
+ ''' |
+class A { |
+ int _x; |
+} |
+ |
+class B { |
+ int _x; |
+} |
+'''); |
+ Source source = addSource(''' |
+import 'lib1.dart'; |
+class C extends A with B {} |
+'''); |
+ await computeAnalysisResult(source); |
+ assertErrors(source, [ |
+ CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION, |
+ StrongModeCode.INVALID_FIELD_OVERRIDE |
+ ]); |
+ verify([source]); |
+ } |
+ |
+ test_privateCollisionInMixinApplication_superclassAndMixin_same() async { |
+ resetWith(options: new AnalysisOptionsImpl()..strongMode = true); |
+ addNamedSource( |
+ '/lib1.dart', |
+ ''' |
+class A { |
+ int _x; |
+} |
+ |
+class B { |
+ int _x; |
+} |
+'''); |
+ Source source = addSource(''' |
+import 'lib1.dart'; |
+class C extends A with A {} |
+'''); |
+ await computeAnalysisResult(source); |
+ assertErrors(source, [ |
+ CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION, |
+ StrongModeCode.INVALID_FIELD_OVERRIDE |
+ ]); |
+ verify([source]); |
+ } |
+ |
test_privateOptionalParameter() async { |
Source source = addSource("f({var _p}) {}"); |
await computeAnalysisResult(source); |