| OLD | NEW |
| 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:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart'; | 9 import 'ast.dart'; |
| 10 import 'constant.dart'; | 10 import 'constant.dart'; |
| (...skipping 10338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10349 // (variable as PropertyInducingElementImpl).propagatedType = | 10349 // (variable as PropertyInducingElementImpl).propagatedType = |
| 10350 // potentialType; | 10350 // potentialType; |
| 10351 // } | 10351 // } |
| 10352 _overrideManager.setType(element, potentialType); | 10352 _overrideManager.setType(element, potentialType); |
| 10353 return potentialType; | 10353 return potentialType; |
| 10354 } | 10354 } |
| 10355 return null; | 10355 return null; |
| 10356 } | 10356 } |
| 10357 | 10357 |
| 10358 /** | 10358 /** |
| 10359 * A client is about to resolve a member in the given class declaration. |
| 10360 */ |
| 10361 void prepareToResolveMembersInClass(ClassDeclaration node) { |
| 10362 _enclosingClassDeclaration = node; |
| 10363 enclosingClass = node.element; |
| 10364 typeAnalyzer.thisType = enclosingClass == null ? null : enclosingClass.type; |
| 10365 } |
| 10366 |
| 10367 /** |
| 10359 * If the given [type] is valid, strongly more specific than the | 10368 * If the given [type] is valid, strongly more specific than the |
| 10360 * existing static type of the given [expression], record it as a propagated | 10369 * existing static type of the given [expression], record it as a propagated |
| 10361 * type of the given [expression]. Otherwise, reset it to `null`. | 10370 * type of the given [expression]. Otherwise, reset it to `null`. |
| 10362 * | 10371 * |
| 10363 * If [hasOldPropagatedType] is `true` then the existing propagated type | 10372 * If [hasOldPropagatedType] is `true` then the existing propagated type |
| 10364 * should also is checked. | 10373 * should also is checked. |
| 10365 */ | 10374 */ |
| 10366 void recordPropagatedTypeIfBetter(Expression expression, DartType type, | 10375 void recordPropagatedTypeIfBetter(Expression expression, DartType type, |
| 10367 [bool hasOldPropagatedType = false]) { | 10376 [bool hasOldPropagatedType = false]) { |
| 10368 // Ensure that propagated type invalid. | 10377 // Ensure that propagated type invalid. |
| (...skipping 4978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15347 nonFields.add(node); | 15356 nonFields.add(node); |
| 15348 return null; | 15357 return null; |
| 15349 } | 15358 } |
| 15350 | 15359 |
| 15351 @override | 15360 @override |
| 15352 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 15361 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
| 15353 | 15362 |
| 15354 @override | 15363 @override |
| 15355 Object visitWithClause(WithClause node) => null; | 15364 Object visitWithClause(WithClause node) => null; |
| 15356 } | 15365 } |
| OLD | NEW |