| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 } | 469 } |
| 470 } | 470 } |
| 471 } | 471 } |
| 472 _assertTrue(showNames.isEmpty); | 472 _assertTrue(showNames.isEmpty); |
| 473 _assertTrue(hideNames.isEmpty); | 473 _assertTrue(hideNames.isEmpty); |
| 474 } | 474 } |
| 475 | 475 |
| 476 void _assertCompatibleParameter( | 476 void _assertCompatibleParameter( |
| 477 FormalParameter node, ParameterElement element) { | 477 FormalParameter node, ParameterElement element) { |
| 478 _assertEquals(node.kind, element.parameterKind); | 478 _assertEquals(node.kind, element.parameterKind); |
| 479 if (node.kind == ParameterKind.NAMED) { | 479 if (node.kind == ParameterKind.NAMED || |
| 480 element.enclosingElement is ConstructorElement) { |
| 480 _assertEquals(node.identifier.name, element.name); | 481 _assertEquals(node.identifier.name, element.name); |
| 481 } | 482 } |
| 482 // check parameter type specific properties | 483 // check parameter type specific properties |
| 483 if (node is DefaultFormalParameter) { | 484 if (node is DefaultFormalParameter) { |
| 484 Expression nodeDefault = node.defaultValue; | 485 Expression nodeDefault = node.defaultValue; |
| 485 if (nodeDefault == null) { | 486 if (nodeDefault == null) { |
| 486 _assertNull(element.defaultValueCode); | 487 _assertNull(element.defaultValueCode); |
| 487 } else { | 488 } else { |
| 488 _assertEquals(nodeDefault.toSource(), element.defaultValueCode); | 489 _assertEquals(nodeDefault.toSource(), element.defaultValueCode); |
| 489 } | 490 } |
| (...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2137 @override | 2138 @override |
| 2138 String toString() => name; | 2139 String toString() => name; |
| 2139 } | 2140 } |
| 2140 | 2141 |
| 2141 class _TokenPair { | 2142 class _TokenPair { |
| 2142 final _TokenDifferenceKind kind; | 2143 final _TokenDifferenceKind kind; |
| 2143 final Token oldToken; | 2144 final Token oldToken; |
| 2144 final Token newToken; | 2145 final Token newToken; |
| 2145 _TokenPair(this.kind, this.oldToken, this.newToken); | 2146 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 2146 } | 2147 } |
| OLD | NEW |