Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 02e41a4

Browse files
committed
Use analyzer's sealed type list
[email protected] Review URL: https://codereview.chromium.org/1161613005
1 parent 9b139ac commit 02e41a4

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lib/src/checker/resolver.dart

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -560,21 +560,8 @@ class RestrictedStaticTypeAnalyzer extends StaticTypeAnalyzer {
560560
}
561561
}
562562

563-
List<DartType> _sealedTypes = null;
564-
565563
bool _isSealed(DartType t) {
566-
if (_sealedTypes == null) {
567-
// TODO(vsm): Use the analyzer's list - see dartbug.com/23125.
568-
_sealedTypes = <DartType>[
569-
_typeProvider.nullType,
570-
_typeProvider.numType,
571-
_typeProvider.intType,
572-
_typeProvider.doubleType,
573-
_typeProvider.boolType,
574-
_typeProvider.stringType
575-
];
576-
}
577-
return _sealedTypes.contains(t);
564+
return _typeProvider.nonSubtypableTypes.contains(t);
578565
}
579566

580567
@override // to propagate types to identifiers

0 commit comments

Comments
 (0)