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

Unified Diff: tests/language/function_subtype0_test.dart

Issue 2599073002: dart2js rti fix: functions are subtypes of Object (Closed)
Patch Set: Created 4 years 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 | « sdk/lib/_internal/js_runtime/lib/js_rti.dart ('k') | tests/language/function_subtype1_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/function_subtype0_test.dart
diff --git a/tests/language/function_subtype0_test.dart b/tests/language/function_subtype0_test.dart
index 1a39d92cb93e2a6c01d2e23cbf80fe9e1b3026cf..4cc4809dedfe82004626d6fa63b3cb76b7471d8c 100644
--- a/tests/language/function_subtype0_test.dart
+++ b/tests/language/function_subtype0_test.dart
@@ -36,6 +36,7 @@ int int__int(int i) => 0;
int int__int2(int i) => 0;
int int__Object(Object o) => 0;
Object Object__int(int i) => null;
+void void__Object(Object o) => null;
int int__double(double d) => 0;
int int__int_int(int i1, int i2) => 0;
void inline_void_(void f()) {}
@@ -82,6 +83,8 @@ main() {
Expect.isFalse(int__int_int is t_int__int);
// (()->void) -> void <: ((int)->void) -> void
Expect.isFalse(inline_void_ is t_inline_void__int);
+ // (Object) -> void <: ((int)->void) -> void
+ Expect.isTrue(void__Object is t_inline_void__int);
// ((int)->void) -> void <: (()->void) -> void
Expect.isFalse(inline_void__int is t_inline_void_);
}
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/js_rti.dart ('k') | tests/language/function_subtype1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698