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

Unified Diff: tests/compiler/dart2js/subtype_test.dart

Issue 2307873002: Fix more-specific for interface types with call functions. (Closed)
Patch Set: Created 4 years, 3 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/compiler/lib/src/dart_types.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/subtype_test.dart
diff --git a/tests/compiler/dart2js/subtype_test.dart b/tests/compiler/dart2js/subtype_test.dart
index bdd9e666f8cef5ae4697376c0203bf39ba812e95..b31e2d8456c8215e2bb0366b96c419b380db3e27 100644
--- a/tests/compiler/dart2js/subtype_test.dart
+++ b/tests/compiler/dart2js/subtype_test.dart
@@ -277,18 +277,21 @@ void testCallableSubtype() {
ClassElement classA = env.getElement('A');
DartType A = classA.rawType;
DartType function = env['Function'];
+ DartType call = env.getMemberType(classA, 'call');
DartType m1 = env.getMemberType(classA, 'm1');
DartType m2 = env.getMemberType(classA, 'm2');
DartType m3 = env.getMemberType(classA, 'm3');
DartType m4 = env.getMemberType(classA, 'm4');
DartType m5 = env.getMemberType(classA, 'm5');
- expect(true, A, function, expectMoreSpecific: false);
- expect(true, A, m1, expectMoreSpecific: false);
+ expect(true, A, function);
ahe 2016/09/02 13:07:11 I'm not sure this is what the specification says.
Johnni Winther 2016/09/02 13:12:37 A << call and call << Function + transitivity.
+ expect(true, A, call);
+ expect(true, call, m1);
+ expect(true, A, m1);
expect(true, A, m2, expectMoreSpecific: false);
expect(false, A, m3);
expect(false, A, m4);
- expect(true, A, m5, expectMoreSpecific: false);
+ expect(true, A, m5);
}));
}
« no previous file with comments | « pkg/compiler/lib/src/dart_types.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698