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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/type.dart

Issue 2647833002: fix #28008, fix #28009 implement FutureOr<T> (Closed)
Patch Set: Merge remote-tracking branch 'origin/master' into 28008_futureort 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 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.dart.element.type; 5 library analyzer.src.dart.element.type;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/token.dart'; 9 import 'package:analyzer/dart/ast/token.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 @override 1374 @override
1375 bool get isDartAsyncFuture { 1375 bool get isDartAsyncFuture {
1376 ClassElement element = this.element; 1376 ClassElement element = this.element;
1377 if (element == null) { 1377 if (element == null) {
1378 return false; 1378 return false;
1379 } 1379 }
1380 return element.name == "Future" && element.library.isDartAsync; 1380 return element.name == "Future" && element.library.isDartAsync;
1381 } 1381 }
1382 1382
1383 @override 1383 @override
1384 bool get isDartAsyncFutureOr {
1385 ClassElement element = this.element;
1386 if (element == null) {
1387 return false;
1388 }
1389 return element.name == "FutureOr" && element.library.isDartAsync;
1390 }
1391
1392 @override
1384 bool get isDartCoreFunction { 1393 bool get isDartCoreFunction {
1385 ClassElement element = this.element; 1394 ClassElement element = this.element;
1386 if (element == null) { 1395 if (element == null) {
1387 return false; 1396 return false;
1388 } 1397 }
1389 return element.name == "Function" && element.library.isDartCore; 1398 return element.name == "Function" && element.library.isDartCore;
1390 } 1399 }
1391 1400
1392 @override 1401 @override
1393 bool get isDartCoreNull { 1402 bool get isDartCoreNull {
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 @override 2379 @override
2371 Element get element => _element; 2380 Element get element => _element;
2372 2381
2373 @override 2382 @override
2374 bool get isBottom => false; 2383 bool get isBottom => false;
2375 2384
2376 @override 2385 @override
2377 bool get isDartAsyncFuture => false; 2386 bool get isDartAsyncFuture => false;
2378 2387
2379 @override 2388 @override
2389 bool get isDartAsyncFutureOr => false;
2390
2391 @override
2380 bool get isDartCoreFunction => false; 2392 bool get isDartCoreFunction => false;
2381 2393
2382 @override 2394 @override
2383 bool get isDartCoreNull => false; 2395 bool get isDartCoreNull => false;
2384 2396
2385 @override 2397 @override
2386 bool get isDynamic => false; 2398 bool get isDynamic => false;
2387 2399
2388 @override 2400 @override
2389 bool get isObject => false; 2401 bool get isObject => false;
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 2803
2792 @override 2804 @override
2793 TypeImpl pruned(List<FunctionTypeAliasElement> prune) => this; 2805 TypeImpl pruned(List<FunctionTypeAliasElement> prune) => this;
2794 2806
2795 @override 2807 @override
2796 VoidTypeImpl substitute2( 2808 VoidTypeImpl substitute2(
2797 List<DartType> argumentTypes, List<DartType> parameterTypes, 2809 List<DartType> argumentTypes, List<DartType> parameterTypes,
2798 [List<FunctionTypeAliasElement> prune]) => 2810 [List<FunctionTypeAliasElement> prune]) =>
2799 this; 2811 this;
2800 } 2812 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698