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

Unified Diff: sdk/lib/_internal/js_runtime/lib/js_rti.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 | « no previous file | tests/language/function_subtype0_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/js_rti.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/js_rti.dart b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
index 91254ef2dad1901511974373cb340ff30e9d1793..f9cd6985f06bedc837c40f3ac4961bf4b436992b 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_rti.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
@@ -452,9 +452,9 @@ bool isSubtype(var s, var t) {
if (isDartFunctionType(t)) {
return isFunctionSubtype(s, t);
}
- // Check function types against the Function class.
+ // Check function types against the Function class and the Object class.
if (isDartFunctionType(s)) {
- return isDartFunctionTypeRti(t);
+ return isDartFunctionTypeRti(t) || isDartObjectTypeRti(t);
}
// Get the object describing the class and check for the subtyping flag
« no previous file with comments | « no previous file | tests/language/function_subtype0_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698