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

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

Issue 1052413003: Make two getters public (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
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 engine.resolver; 5 library engine.resolver;
6 6
7 import "dart:math" as math; 7 import "dart:math" as math;
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/src/generated/utilities_collection.dart'; 10 import 'package:analyzer/src/generated/utilities_collection.dart';
(...skipping 11578 matching lines...) Expand 10 before | Expand all | Expand 10 after
11589 * type is more specific than the current type. 11589 * type is more specific than the current type.
11590 * 11590 *
11591 * @param expression the expression used to access the static element whose ty pes might be 11591 * @param expression the expression used to access the static element whose ty pes might be
11592 * promoted 11592 * promoted
11593 * @param potentialType the potential type of the elements 11593 * @param potentialType the potential type of the elements
11594 */ 11594 */
11595 void _promote(Expression expression, DartType potentialType) { 11595 void _promote(Expression expression, DartType potentialType) {
11596 VariableElement element = getPromotionStaticElement(expression); 11596 VariableElement element = getPromotionStaticElement(expression);
11597 if (element != null) { 11597 if (element != null) {
11598 // may be mutated somewhere in closure 11598 // may be mutated somewhere in closure
11599 if ((element as VariableElementImpl).isPotentiallyMutatedInClosure) { 11599 if (element.isPotentiallyMutatedInClosure) {
11600 return; 11600 return;
11601 } 11601 }
11602 // prepare current variable type 11602 // prepare current variable type
11603 DartType type = _promoteManager.getType(element); 11603 DartType type = _promoteManager.getType(element);
11604 if (type == null) { 11604 if (type == null) {
11605 type = expression.staticType; 11605 type = expression.staticType;
11606 } 11606 }
11607 // Declared type should not be "dynamic". 11607 // Declared type should not be "dynamic".
11608 if (type == null || type.isDynamic) { 11608 if (type == null || type.isDynamic) {
11609 return; 11609 return;
(...skipping 3873 matching lines...) Expand 10 before | Expand all | Expand 10 after
15483 nonFields.add(node); 15483 nonFields.add(node);
15484 return null; 15484 return null;
15485 } 15485 }
15486 15486
15487 @override 15487 @override
15488 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); 15488 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this);
15489 15489
15490 @override 15490 @override
15491 Object visitWithClause(WithClause node) => null; 15491 Object visitWithClause(WithClause node) => null;
15492 } 15492 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_handle.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698