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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart

Issue 2468493003: Type-related fixes (Closed)
Patch Set: Created 4 years, 1 month 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/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
index 946507ca217b5c90b615dd971660901c0b6d3d60..5553144bf0effbe623e99fb54bb84ac1b948a770 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
@@ -795,7 +795,9 @@ runtimeType(obj) {
// Delegate to the (possibly user-defined) method on the object.
var extension = getExtensionType(obj);
if (extension != null) {
- return JS('', '#[dartx.runtimeType]', obj);
+ result = JS('', '#[dartx.runtimeType]', obj);
+ // If extension doesn't override runtimeType, return the extension type.
+ return result ?? wrapType(extension);
}
if (JS('bool', 'typeof # == "function"', obj)) {
return wrapType(getReifiedType(obj));
« no previous file with comments | « pkg/dev_compiler/test/browser/language_tests.js ('k') | pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698