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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 894853003: Add a getter to TypeProvider for Future<Null>. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 079b177b86450a877c1d1eb552614163ec2afbd5..01e10a4277957e8d550e94bd33cc8c926e97b4dd 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -72,8 +72,7 @@ class BestPracticesVerifier extends RecursiveAstVisitor<Object> {
* @param errorReporter the error reporter
*/
BestPracticesVerifier(this._errorReporter, TypeProvider typeProvider)
- : _futureNullType = typeProvider.futureType.substitute4(
- <DartType>[typeProvider.nullType]);
+ : _futureNullType = typeProvider.futureNullType;
@override
Object visitArgumentList(ArgumentList node) {
@@ -13407,6 +13406,11 @@ abstract class TypeProvider {
InterfaceType get functionType;
/**
+ * Return the type representing 'Future<Null>'.
+ */
+ InterfaceType get futureNullType;
+
+ /**
* Return the type representing the built-in type 'Future'.
*/
InterfaceType get futureType;
@@ -13523,6 +13527,11 @@ class TypeProviderImpl implements TypeProvider {
InterfaceType _functionType;
/**
+ * The type representing 'Future<Null>'.
+ */
+ InterfaceType _futureNullType;
+
+ /**
* The type representing the built-in type 'Future'.
*/
InterfaceType _futureType;
@@ -13610,6 +13619,9 @@ class TypeProviderImpl implements TypeProvider {
InterfaceType get functionType => _functionType;
@override
+ InterfaceType get futureNullType => _futureNullType;
+
+ @override
InterfaceType get futureType => _futureType;
@override
@@ -13692,6 +13704,7 @@ class TypeProviderImpl implements TypeProvider {
_symbolType = _getType(coreNamespace, "Symbol");
_typeType = _getType(coreNamespace, "Type");
_undefinedType = UndefinedTypeImpl.instance;
+ _futureNullType = _futureType.substitute4(<DartType>[_nullType]);
}
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | pkg/analyzer/lib/src/generated/testing/test_type_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698