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

Unified Diff: pkg/analyzer/lib/src/dart/element/type.dart

Issue 1724543002: fix #25487, infer block lambdas from return statements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/type.dart
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index cfc076ff7ef7d17953228ec9f79454fcfdc724c9..29658fb7126bbf1e96bae0458cb46394d0259cb7 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -1285,13 +1285,13 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
// In other words, given the set of all types R such that T << Future<R>,
// let S be the most specific of those types, if any such S exists.
//
- // Since we only care about the most specific type, it is sufficent to
+ // Since we only care about the most specific type, it is sufficient to
// look at the types appearing as a parameter to Future in the type
// hierarchy of T. We don't need to consider the supertypes of those
// types, since they are by definition less specific.
List<DartType> candidateTypes =
_searchTypeHierarchyForFutureTypeParameters();
- DartType flattenResult = _findMostSpecificType(candidateTypes, typeSystem);
+ DartType flattenResult = findMostSpecificType(candidateTypes, typeSystem);
if (flattenResult != null) {
return flattenResult;
}
@@ -1923,7 +1923,7 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
* If there is a single type which is at least as specific as all of the
* types in [types], return it. Otherwise return `null`.
*/
- static DartType _findMostSpecificType(
+ static DartType findMostSpecificType(
List<DartType> types, TypeSystem typeSystem) {
// The << relation ("more specific than") is a partial ordering on types,
// so to find the most specific type of a set, we keep a bucket of the most
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698