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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2982373002: Resynthesize mixins from Kernel. (Closed)
Patch Set: Created 3 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
Index: pkg/analyzer/test/src/summary/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 8e6533e6b46117bf13eeccb710d6e5c73f7f1be7..24b235a3840c0fd65dc7e2eb6c47f464d1e58eb6 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -1372,14 +1372,14 @@ abstract class C {
test_class_alias() async {
var library = await checkLibrary('''
-class C = D with E, F;
+class C = D with E, F, G;
class D {}
class E {}
class F {}
+class G {}
''');
- if (isStrongMode) {
- checkElementText(library, r'''
-class alias C extends D with E, F {
+ checkElementText(library, r'''
+class alias C extends D with E, F, G {
synthetic C() = D;
}
class D {
@@ -1388,20 +1388,9 @@ class E {
}
class F {
}
-''');
- } else {
- checkElementText(library, r'''
-class alias C extends D with E, F {
- synthetic C() = D;
-}
-class D {
-}
-class E {
-}
-class F {
+class G {
}
''');
- }
}
test_class_alias_abstract() async {
@@ -1472,6 +1461,26 @@ class E {
}
}
+ test_class_alias_generic() async {
+ var library = await checkLibrary('''
+class Z = A with B<int>, C<double>;
+class A {}
+class B<B1> {}
+class C<C1> {}
+''');
+ checkElementText(library, r'''
+class alias Z extends A with B<int>, C<double> {
+ synthetic Z() = A;
+}
+class A {
+}
+class B<B1> {
+}
+class C<C1> {
+}
+''');
+ }
+
test_class_alias_with_forwarding_constructors() async {
addLibrarySource('/a.dart', '''
class Base {
@@ -2563,29 +2572,46 @@ class C {
}
test_class_mixins() async {
- var library = await checkLibrary(
- 'class C extends Object with D, E {} class D {} class E {}');
- if (isStrongMode) {
- checkElementText(library, r'''
-class C extends Object with D, E {
+ var library = await checkLibrary('''
+class C extends D with E, F, G {}
+class D {}
+class E {}
+class F {}
+class G {}
+''');
+ checkElementText(library, r'''
+class C extends D with E, F, G {
synthetic C();
}
class D {
}
class E {
}
+class F {
+}
+class G {
+}
''');
- } else {
- checkElementText(library, r'''
-class C extends Object with D, E {
- synthetic C();
+ }
+
+ test_class_mixins_generic() async {
+ var library = await checkLibrary('''
+class Z extends A with B<int>, C<double> {}
+class A {}
+class B<B1> {}
+class C<C1> {}
+''');
+ checkElementText(library, r'''
+class Z extends A with B<int>, C<double> {
+ synthetic Z();
}
-class D {
+class A {
}
-class E {
+class B<B1> {
+}
+class C<C1> {
}
''');
- }
}
test_class_mixins_unresolved() async {

Powered by Google App Engine
This is Rietveld 408576698