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

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

Issue 1620453002: Disable incremental resolution for constructor parameter names changes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698