From 36792393798c3c98559422f566d2248e5a3f36fe Mon Sep 17 00:00:00 2001 From: Mark Zhou Date: Thu, 23 Jan 2020 00:42:31 +0000 Subject: [PATCH] [dartdevc] Normalizing legacy null to null. Change-Id: I3d0ede71e4e979e060e0c8aeed4760cf1e6ceee4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133002 Reviewed-by: Nicholas Shahan Reviewed-by: Sigmund Cherem Commit-Queue: Mark Zhou --- .../_internal/js_dev_runtime/private/ddc_runtime/types.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk_nnbd/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart b/sdk_nnbd/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart index 2733439fd16f6..318a96a50ec08 100644 --- a/sdk_nnbd/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart +++ b/sdk_nnbd/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart @@ -268,12 +268,12 @@ Object nullable(type) { // TODO(nshahan): Update after the normalization doc PR lands. @notNull Object legacy(type) { - // TODO(nshahan) Maybe normailize never*, Null*. - if (_isLegacy(type) || _isNullable(type) || _isTop(type)) return type; + if (_isLegacy(type) || _isNullable(type) || _isTop(type) || _isNullType(type)) + return type; // Check if a legacy version of this type has already been created. if (JS('!', '#.hasOwnProperty(#)', type, _cachedLegacy)) { - return JS('!', '#[#]', type, _cachedLegacy); + return JS('!', '#[#]', type, _cachedLegacy); } // Cache a canonical legacy version of this type on this type. var cachedType = LegacyType(type);