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

Side by Side Diff: pkg/analyzer/lib/src/dart/ast/ast.dart

Issue 2187863003: Always set correspondingStaticParameters and correspondingPropagatedParameters, to clear when we don (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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/lib/src/generated/element_resolver.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.dart.ast.ast; 5 library analyzer.src.dart.ast.ast;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 ..add(leftParenthesis) 391 ..add(leftParenthesis)
392 ..addAll(_arguments) 392 ..addAll(_arguments)
393 ..add(rightParenthesis); 393 ..add(rightParenthesis);
394 394
395 List<ParameterElement> get correspondingPropagatedParameters => 395 List<ParameterElement> get correspondingPropagatedParameters =>
396 _correspondingPropagatedParameters; 396 _correspondingPropagatedParameters;
397 397
398 @override 398 @override
399 void set correspondingPropagatedParameters( 399 void set correspondingPropagatedParameters(
400 List<ParameterElement> parameters) { 400 List<ParameterElement> parameters) {
401 if (parameters.length != _arguments.length) { 401 if (parameters != null && parameters.length != _arguments.length) {
402 throw new IllegalArgumentException( 402 throw new IllegalArgumentException(
403 "Expected ${_arguments.length} parameters, not ${parameters.length}"); 403 "Expected ${_arguments.length} parameters, not ${parameters.length}");
404 } 404 }
405 _correspondingPropagatedParameters = parameters; 405 _correspondingPropagatedParameters = parameters;
406 } 406 }
407 407
408 List<ParameterElement> get correspondingStaticParameters => 408 List<ParameterElement> get correspondingStaticParameters =>
409 _correspondingStaticParameters; 409 _correspondingStaticParameters;
410 410
411 @override 411 @override
412 void set correspondingStaticParameters(List<ParameterElement> parameters) { 412 void set correspondingStaticParameters(List<ParameterElement> parameters) {
413 if (parameters.length != _arguments.length) { 413 if (parameters != null && parameters.length != _arguments.length) {
414 throw new IllegalArgumentException( 414 throw new IllegalArgumentException(
415 "Expected ${_arguments.length} parameters, not ${parameters.length}"); 415 "Expected ${_arguments.length} parameters, not ${parameters.length}");
416 } 416 }
417 _correspondingStaticParameters = parameters; 417 _correspondingStaticParameters = parameters;
418 } 418 }
419 419
420 @override 420 @override
421 Token get endToken => rightParenthesis; 421 Token get endToken => rightParenthesis;
422 422
423 @override 423 @override
(...skipping 10619 matching lines...) Expand 10 before | Expand all | Expand 10 after
11043 11043
11044 @override 11044 @override
11045 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => 11045 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
11046 visitor.visitYieldStatement(this); 11046 visitor.visitYieldStatement(this);
11047 11047
11048 @override 11048 @override
11049 void visitChildren(AstVisitor visitor) { 11049 void visitChildren(AstVisitor visitor) {
11050 _expression?.accept(visitor); 11050 _expression?.accept(visitor);
11051 } 11051 }
11052 } 11052 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/element_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698