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

Unified Diff: tests/compiler/dart2js/kernel/impact_test.dart

Issue 2683403002: Handle equivalence for generic mixins. (Closed)
Patch Set: Updated cf. comment Created 3 years, 10 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 | « no previous file | tests/compiler/dart2js/serialization/test_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/impact_test.dart
diff --git a/tests/compiler/dart2js/kernel/impact_test.dart b/tests/compiler/dart2js/kernel/impact_test.dart
index 5fd2411e036e09f56319ec7d85920b5eb9c3db90..50c1024df72ffc9d12473d6fb4c80f938b5cb05a 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -186,6 +186,8 @@ main() {
testNativeField(null);
testMixinInstantiation();
testNamedMixinInstantiation();
+ testGenericMixinInstantiation();
+ testGenericNamedMixinInstantiation();
}
testEmpty() {}
@@ -630,6 +632,8 @@ class NativeClass {
testNativeField(NativeClass c) => c.field;
testMixinInstantiation() => new Sub();
testNamedMixinInstantiation() => new NamedMixin();
+testGenericMixinInstantiation() => new GenericSub<int, String>();
+testGenericNamedMixinInstantiation() => new GenericNamedMixin<int, String>();
''',
'sdk/tests/compiler/dart2js_native/helper.dart': '''
import 'dart:_js_helper';
@@ -654,6 +658,14 @@ class Mixin2 {}
class Sub extends Super with Mixin1, Mixin2 {}
class NamedMixin = Super with Mixin1, Mixin2;
+class GenericSuper<X1, Y1> {}
+class GenericMixin1<X2, Y2> {}
+class GenericMixin2<X3, Y3> {}
+class GenericSub<X4, Y4> extends GenericSuper<X4, Y4>
+ with GenericMixin1<X4, Y4>, GenericMixin2<X4, Y4> {}
+class GenericNamedMixin<X5, Y5> = GenericSuper<X5, Y5>
+ with GenericMixin1<X5, Y5>, GenericMixin2<X5, Y5>;
+
const String _serializedScriptValue =
'num|String|bool|'
'JSExtendableArray|=Object';
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698