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

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

Issue 2746333008: Run dartfmt on dart2js codebase. (Closed)
Patch Set: Format all analyzer packages Created 3 years, 9 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.generated.element_resolver; 5 library analyzer.src.generated.element_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/syntactic_entity.dart'; 10 import 'package:analyzer/dart/ast/syntactic_entity.dart';
(...skipping 2480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 * be used when looking up members. Otherwise, return the original type. 2491 * be used when looking up members. Otherwise, return the original type.
2492 */ 2492 */
2493 DartType _resolveTypeParameter(DartType type) => 2493 DartType _resolveTypeParameter(DartType type) =>
2494 type?.resolveToBound(_resolver.typeProvider.objectType); 2494 type?.resolveToBound(_resolver.typeProvider.objectType);
2495 2495
2496 /** 2496 /**
2497 * Return `true` if we should report an error as a result of looking up a 2497 * Return `true` if we should report an error as a result of looking up a
2498 * [member] in the given [type] and not finding any member. 2498 * [member] in the given [type] and not finding any member.
2499 */ 2499 */
2500 bool _shouldReportMissingMember(DartType type, Element member) { 2500 bool _shouldReportMissingMember(DartType type, Element member) {
2501 return member == null && type != null && !type.isDynamic && !type.isDartCore Null; 2501 return member == null &&
2502 type != null &&
2503 !type.isDynamic &&
2504 !type.isDartCoreNull;
2502 } 2505 }
2503 2506
2504 /** 2507 /**
2505 * Checks whether the given [expression] is a reference to a class. If it is 2508 * Checks whether the given [expression] is a reference to a class. If it is
2506 * then the element representing the class is returned, otherwise `null` is 2509 * then the element representing the class is returned, otherwise `null` is
2507 * returned. 2510 * returned.
2508 */ 2511 */
2509 static ClassElement getTypeReference(Expression expression) { 2512 static ClassElement getTypeReference(Expression expression) {
2510 if (expression is Identifier) { 2513 if (expression is Identifier) {
2511 Element staticElement = expression.staticElement; 2514 Element staticElement = expression.staticElement;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 2648
2646 @override 2649 @override
2647 Element get staticElement => null; 2650 Element get staticElement => null;
2648 2651
2649 @override 2652 @override
2650 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => null; 2653 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => null;
2651 2654
2652 @override 2655 @override
2653 void visitChildren(AstVisitor visitor) {} 2656 void visitChildren(AstVisitor visitor) {}
2654 } 2657 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/sdk/patch.dart ('k') | pkg/analyzer/lib/src/generated/incremental_resolution_validator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698