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

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 2581803002: Add access to FutureOr in TypeProviders (and add implementation in mock sdks) (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.generated.resolver; 5 library analyzer.src.generated.resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
(...skipping 8979 matching lines...) Expand 10 before | Expand all | Expand 10 after
8990 * Return the type representing 'Future<dynamic>'. 8990 * Return the type representing 'Future<dynamic>'.
8991 */ 8991 */
8992 InterfaceType get futureDynamicType; 8992 InterfaceType get futureDynamicType;
8993 8993
8994 /** 8994 /**
8995 * Return the type representing 'Future<Null>'. 8995 * Return the type representing 'Future<Null>'.
8996 */ 8996 */
8997 InterfaceType get futureNullType; 8997 InterfaceType get futureNullType;
8998 8998
8999 /** 8999 /**
9000 * Return the type representing the built-in type 'FutureOr'.
9001 */
9002 InterfaceType get futureOrType;
9003
9004 /**
9000 * Return the type representing the built-in type 'Future'. 9005 * Return the type representing the built-in type 'Future'.
9001 */ 9006 */
9002 InterfaceType get futureType; 9007 InterfaceType get futureType;
9003 9008
9004 /** 9009 /**
9005 * Return the type representing the built-in type 'int'. 9010 * Return the type representing the built-in type 'int'.
9006 */ 9011 */
9007 InterfaceType get intType; 9012 InterfaceType get intType;
9008 9013
9009 /** 9014 /**
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
9178 * The type representing 'Future<dynamic>'. 9183 * The type representing 'Future<dynamic>'.
9179 */ 9184 */
9180 InterfaceType _futureDynamicType; 9185 InterfaceType _futureDynamicType;
9181 9186
9182 /** 9187 /**
9183 * The type representing 'Future<Null>'. 9188 * The type representing 'Future<Null>'.
9184 */ 9189 */
9185 InterfaceType _futureNullType; 9190 InterfaceType _futureNullType;
9186 9191
9187 /** 9192 /**
9193 * The type representing the built-in type 'FutureOr'.
9194 */
9195 InterfaceType _futureOrType;
9196
9197 /**
9188 * The type representing the built-in type 'Future'. 9198 * The type representing the built-in type 'Future'.
9189 */ 9199 */
9190 InterfaceType _futureType; 9200 InterfaceType _futureType;
9191 9201
9192 /** 9202 /**
9193 * The type representing the built-in type 'int'. 9203 * The type representing the built-in type 'int'.
9194 */ 9204 */
9195 InterfaceType _intType; 9205 InterfaceType _intType;
9196 9206
9197 /** 9207 /**
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
9308 @override 9318 @override
9309 InterfaceType get functionType => _functionType; 9319 InterfaceType get functionType => _functionType;
9310 9320
9311 @override 9321 @override
9312 InterfaceType get futureDynamicType => _futureDynamicType; 9322 InterfaceType get futureDynamicType => _futureDynamicType;
9313 9323
9314 @override 9324 @override
9315 InterfaceType get futureNullType => _futureNullType; 9325 InterfaceType get futureNullType => _futureNullType;
9316 9326
9317 @override 9327 @override
9328 InterfaceType get futureOrType => _futureOrType;
9329
9330 @override
9318 InterfaceType get futureType => _futureType; 9331 InterfaceType get futureType => _futureType;
9319 9332
9320 @override 9333 @override
9321 InterfaceType get intType => _intType; 9334 InterfaceType get intType => _intType;
9322 9335
9323 @override 9336 @override
9324 InterfaceType get iterableDynamicType => _iterableDynamicType; 9337 InterfaceType get iterableDynamicType => _iterableDynamicType;
9325 9338
9326 @override 9339 @override
9327 InterfaceType get iterableType => _iterableType; 9340 InterfaceType get iterableType => _iterableType;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
9392 * Initialize the types provided by this type provider from the given 9405 * Initialize the types provided by this type provider from the given
9393 * [Namespace]s. 9406 * [Namespace]s.
9394 */ 9407 */
9395 void _initializeFrom(Namespace coreNamespace, Namespace asyncNamespace) { 9408 void _initializeFrom(Namespace coreNamespace, Namespace asyncNamespace) {
9396 _boolType = _getType(coreNamespace, "bool"); 9409 _boolType = _getType(coreNamespace, "bool");
9397 _bottomType = BottomTypeImpl.instance; 9410 _bottomType = BottomTypeImpl.instance;
9398 _deprecatedType = _getType(coreNamespace, "Deprecated"); 9411 _deprecatedType = _getType(coreNamespace, "Deprecated");
9399 _doubleType = _getType(coreNamespace, "double"); 9412 _doubleType = _getType(coreNamespace, "double");
9400 _dynamicType = DynamicTypeImpl.instance; 9413 _dynamicType = DynamicTypeImpl.instance;
9401 _functionType = _getType(coreNamespace, "Function"); 9414 _functionType = _getType(coreNamespace, "Function");
9415 _futureOrType = _getType(asyncNamespace, "FutureOr");
9402 _futureType = _getType(asyncNamespace, "Future"); 9416 _futureType = _getType(asyncNamespace, "Future");
9403 _intType = _getType(coreNamespace, "int"); 9417 _intType = _getType(coreNamespace, "int");
9404 _iterableType = _getType(coreNamespace, "Iterable"); 9418 _iterableType = _getType(coreNamespace, "Iterable");
9405 _listType = _getType(coreNamespace, "List"); 9419 _listType = _getType(coreNamespace, "List");
9406 _mapType = _getType(coreNamespace, "Map"); 9420 _mapType = _getType(coreNamespace, "Map");
9407 _nullType = _getType(coreNamespace, "Null"); 9421 _nullType = _getType(coreNamespace, "Null");
9408 _numType = _getType(coreNamespace, "num"); 9422 _numType = _getType(coreNamespace, "num");
9409 _objectType = _getType(coreNamespace, "Object"); 9423 _objectType = _getType(coreNamespace, "Object");
9410 _stackTraceType = _getType(coreNamespace, "StackTrace"); 9424 _stackTraceType = _getType(coreNamespace, "StackTrace");
9411 _streamType = _getType(asyncNamespace, "Stream"); 9425 _streamType = _getType(asyncNamespace, "Stream");
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
10781 return null; 10795 return null;
10782 } 10796 }
10783 if (identical(node.staticElement, variable)) { 10797 if (identical(node.staticElement, variable)) {
10784 if (node.inSetterContext()) { 10798 if (node.inSetterContext()) {
10785 result = true; 10799 result = true;
10786 } 10800 }
10787 } 10801 }
10788 return null; 10802 return null;
10789 } 10803 }
10790 } 10804 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698