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

Unified Diff: lib/src/checker/resolver.dart

Issue 1161613005: Use analyzer's sealed type list (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/checker/resolver.dart
diff --git a/lib/src/checker/resolver.dart b/lib/src/checker/resolver.dart
index 3542ad4d9d5dd64a92acb36d8515246184e7c733..427baf3575f9516954cbb781d8016b0608206271 100644
--- a/lib/src/checker/resolver.dart
+++ b/lib/src/checker/resolver.dart
@@ -560,21 +560,8 @@ class RestrictedStaticTypeAnalyzer extends StaticTypeAnalyzer {
}
}
- List<DartType> _sealedTypes = null;
-
bool _isSealed(DartType t) {
- if (_sealedTypes == null) {
- // TODO(vsm): Use the analyzer's list - see dartbug.com/23125.
- _sealedTypes = <DartType>[
- _typeProvider.nullType,
- _typeProvider.numType,
- _typeProvider.intType,
- _typeProvider.doubleType,
- _typeProvider.boolType,
- _typeProvider.stringType
- ];
- }
- return _sealedTypes.contains(t);
+ return _typeProvider.nonSubtypableTypes.contains(t);
}
@override // to propagate types to identifiers
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698