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

Unified Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 1215053003: Compute mixin application constructors in the ClassElement.constructors getter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/generated/all_the_rest_test.dart ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cfc2f626a02c90f30962199c809c242e234c53f9..e2124442a74b33fcd254e9f4a658ca49ac233549 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -1912,10 +1912,7 @@ class C = a.A with M;'''
class M {}
class C = bool with M;''');
computeLibrarySourceErrors(source);
- assertErrors(source, [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -1933,10 +1930,7 @@ class C = double with M;''');
class M {}
class C = int with M;''');
computeLibrarySourceErrors(source);
- assertErrors(source, [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -1963,10 +1957,7 @@ class C = num with M;''');
class M {}
class C = String with M;''');
computeLibrarySourceErrors(source);
- assertErrors(source, [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -5282,6 +5273,22 @@ class M2 = Object with M1;''');
verify([source]);
}
+ void test_recursiveInterfaceInheritance_mixin_superclass() {
+ // Make sure we don't get CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS in
+ // addition--that would just be confusing.
+ Source source = addSource('''
+class C = D with M;
+class D = C with M;
+class M {}
+''');
+ computeLibrarySourceErrors(source);
+ assertErrors(source, [
+ CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+ CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
+ ]);
+ verify([source]);
+ }
+
void test_recursiveInterfaceInheritance_tail() {
Source source = addSource(r'''
abstract class A implements A {}
« no previous file with comments | « pkg/analyzer/test/generated/all_the_rest_test.dart ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698