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

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

Issue 2671113002: fix #28642, handling of top and bottom types in DDC (Closed)
Patch Set: fix 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
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 d94d1a995bafd3dee2710c5e2322ac35d5c314d3..68d8fd043781de47e7957051c8067abbc6152953 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
@@ -513,6 +513,9 @@ instanceOfOrNull(obj, type) => JS(
instanceOf(obj, type) => JS(
'',
'''(() => {
+ if ($obj == null) {
+ return $type == $Null || $_isTop($type);
+ }
let result = $strongInstanceOf($obj, $type);
if (result !== null) return result;
let actual = $getReifiedType($obj);
« no previous file with comments | « pkg/dev_compiler/test/browser/runtime_tests.js ('k') | pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698