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

Unified Diff: pkg/analyzer/lib/src/summary/summary_sdk.dart

Issue 2667343005: Infer Null for return type of functions with empty returns. (Closed)
Patch Set: Avoid merge conflict Created 3 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/summary/summary_sdk.dart
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index 0a618061912af23d96e1c2a3ed4885445923d8a2..5ac11b73173915768f03ec0cc77859b293df86df 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -123,6 +123,7 @@ class SummaryTypeProvider extends TypeProviderBase {
InterfaceType _functionType;
InterfaceType _futureDynamicType;
InterfaceType _futureNullType;
+ InterfaceType _futureOrNullType;
InterfaceType _futureOrType;
InterfaceType _futureType;
InterfaceType _intType;
@@ -190,6 +191,13 @@ class SummaryTypeProvider extends TypeProviderBase {
}
@override
+ InterfaceType get futureOrNullType {
+ assert(_asyncLibrary != null);
+ _futureOrNullType ??= futureOrType.instantiate(<DartType>[nullType]);
+ return _futureOrNullType;
+ }
+
+ @override
InterfaceType get futureOrType {
assert(_asyncLibrary != null);
try {

Powered by Google App Engine
This is Rietveld 408576698