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

Unified Diff: pkg/analyzer/lib/src/generated/testing/test_type_provider.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
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
diff --git a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
index 9a719d4acb92ff7b60d8fa3da9376fc47f2ae17d..099e50c143bb0413f9397756f657ce9147c71d68 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -47,7 +47,12 @@ class TestTypeProvider implements TypeProvider {
InterfaceType _functionType;
/**
- * THe type representing the built-in type 'Future'
+ * The type representing 'Future<Null>'
+ */
+ InterfaceType _futureNullType;
+
+ /**
+ * The type representing the built-in type 'Future'
*/
InterfaceType _futureType;
@@ -177,6 +182,14 @@ class TestTypeProvider implements TypeProvider {
}
@override
+ InterfaceType get futureNullType {
+ if (_futureNullType == null) {
+ _futureNullType = futureType.substitute4(<DartType>[nullType]);
+ }
+ return _futureNullType;
+ }
+
+ @override
InterfaceType get futureType {
if (_futureType == null) {
_futureType = ElementFactory.classElement2("Future", ["T"]).type;
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698