| 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 analyzer.src.generated.incremental_resolver; | 5 library analyzer.src.generated.incremental_resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 _assertSameAnnotations(node, element); | 416 _assertSameAnnotations(node, element); |
| 417 _assertEquals(node.isConst, element.isConst); | 417 _assertEquals(node.isConst, element.isConst); |
| 418 _assertEquals(node.isFinal, element.isFinal); | 418 _assertEquals(node.isFinal, element.isFinal); |
| 419 if (_enclosingFieldNode != null) { | 419 if (_enclosingFieldNode != null) { |
| 420 _assertEquals(_enclosingFieldNode.isStatic, element.isStatic); | 420 _assertEquals(_enclosingFieldNode.isStatic, element.isStatic); |
| 421 } | 421 } |
| 422 _assertSameType( | 422 _assertSameType( |
| 423 (node.parent as VariableDeclarationList).type, element.type); | 423 (node.parent as VariableDeclarationList).type, element.type); |
| 424 // matches, restore the existing element | 424 // matches, restore the existing element |
| 425 node.name.staticElement = element; | 425 node.name.staticElement = element; |
| 426 if (element is VariableElementImpl) { | 426 Element variable = element; |
| 427 (element as VariableElementImpl).initializer = newElement.initializer; | 427 if (variable is VariableElementImpl) { |
| 428 variable.initializer = newElement.initializer; |
| 428 } | 429 } |
| 429 } | 430 } |
| 430 | 431 |
| 431 @override | 432 @override |
| 432 visitWithClause(WithClause node) { | 433 visitWithClause(WithClause node) { |
| 433 List<TypeName> nodes = node.mixinTypes; | 434 List<TypeName> nodes = node.mixinTypes; |
| 434 List<InterfaceType> types = _enclosingClass.mixins; | 435 List<InterfaceType> types = _enclosingClass.mixins; |
| 435 _assertSameTypes(nodes, types); | 436 _assertSameTypes(nodes, types); |
| 436 } | 437 } |
| 437 | 438 |
| (...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2236 @override | 2237 @override |
| 2237 String toString() => name; | 2238 String toString() => name; |
| 2238 } | 2239 } |
| 2239 | 2240 |
| 2240 class _TokenPair { | 2241 class _TokenPair { |
| 2241 final _TokenDifferenceKind kind; | 2242 final _TokenDifferenceKind kind; |
| 2242 final Token oldToken; | 2243 final Token oldToken; |
| 2243 final Token newToken; | 2244 final Token newToken; |
| 2244 _TokenPair(this.kind, this.oldToken, this.newToken); | 2245 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 2245 } | 2246 } |
| OLD | NEW |