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

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

Issue 1262163002: Implement DEP 34 (less restricted mixins) in analysis engine. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/engine_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/non_error_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index c1da94108bf40ee9de8f229fe5a7250694cbc84e..64da2289159ca36af8e5db0c758b5087a2e624b6 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -6,6 +6,7 @@ library engine.non_error_resolver_test;
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
import 'package:analyzer/src/generated/source_io.dart';
@@ -3139,6 +3140,19 @@ class B extends Object with A {}''');
verify([source]);
}
+ void test_mixinInheritsFromNotObject_classDeclaration_extends() {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWithOptions(options);
+ Source source = addSource(r'''
+class A {}
+class B extends A {}
+class C extends Object with B {}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_mixinInheritsFromNotObject_classDeclaration_mixTypeAlias() {
Source source = addSource(r'''
class A {}
@@ -3149,6 +3163,45 @@ class C extends Object with B {}''');
verify([source]);
}
+ void test_mixinInheritsFromNotObject_classDeclaration_with() {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWithOptions(options);
+ Source source = addSource(r'''
+class A {}
+class B extends Object with A {}
+class C extends Object with B {}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_mixinInheritsFromNotObject_typeAlias_extends() {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWithOptions(options);
+ Source source = addSource(r'''
+class A {}
+class B extends A {}
+class C = Object with B;''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_mixinInheritsFromNotObject_typeAlias_with() {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWithOptions(options);
+ Source source = addSource(r'''
+class A {}
+class B extends Object with A {}
+class C = Object with B;''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_mixinInheritsFromNotObject_typedef_mixTypeAlias() {
Source source = addSource(r'''
class A {}
@@ -3159,6 +3212,20 @@ class C = Object with B;''');
verify([source]);
}
+ void test_mixinReferencesSuper() {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ resetWithOptions(options);
+ Source source = addSource(r'''
+class A {
+ toString() => super.toString();
+}
+class B extends Object with A {}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_multipleSuperInitializers_no() {
Source source = addSource(r'''
class A {}
« no previous file with comments | « pkg/analyzer/test/generated/engine_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698