Skip to content

Commit 5af2cc7

Browse files
fishythefishcommit-bot@chromium.org
authored andcommitted
[dart2js] Add a raw type predicate to LegacyType and NullableType which forwards to the wrapped type.
Change-Id: I5b16300f189aba36efee2f14b5e3f60f1c3689bd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137861 Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Mayank Patke <[email protected]>
1 parent 5b23373 commit 5af2cc7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/compiler/lib/src/elements/types.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ class LegacyType extends DartType {
231231
@override
232232
bool _isTop(bool useNullSafety) => baseType.isObject;
233233

234+
@override
235+
bool _treatAsRaw(bool useNullSafety) => baseType._treatAsRaw(useNullSafety);
236+
234237
@override
235238
bool get containsTypeVariables => baseType.containsTypeVariables;
236239

@@ -289,6 +292,9 @@ class NullableType extends DartType {
289292
@override
290293
bool _isStrongTop(bool isLegacy) => baseType.isObject;
291294

295+
@override
296+
bool _treatAsRaw(bool useNullSafety) => baseType._treatAsRaw(useNullSafety);
297+
292298
@override
293299
bool get containsTypeVariables => baseType.containsTypeVariables;
294300

0 commit comments

Comments
 (0)