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

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

Issue 1169833007: Filter additional error codes (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.task.dart; 5 library analyzer.src.task.dart;
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/src/context/cache.dart'; 10 import 'package:analyzer/src/context/cache.dart';
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 /** 418 /**
419 * Remove [CompileTimeErrorCode.DUPLICATE_DEFINITION] errors from the given 419 * Remove [CompileTimeErrorCode.DUPLICATE_DEFINITION] errors from the given
420 * [errors] list. 420 * [errors] list.
421 */ 421 */
422 void removeDuplicateDefinitionErrors(List<AnalysisError> errors) { 422 void removeDuplicateDefinitionErrors(List<AnalysisError> errors) {
423 if (errors.isNotEmpty) { 423 if (errors.isNotEmpty) {
424 errors.removeWhere((error) { 424 errors.removeWhere((error) {
425 ErrorCode errorCode = error.errorCode; 425 ErrorCode errorCode = error.errorCode;
426 return errorCode == CompileTimeErrorCode.DUPLICATE_DEFINITION || 426 return errorCode == CompileTimeErrorCode.DUPLICATE_DEFINITION ||
427 errorCode == CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME || 427 errorCode == CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME ||
428 errorCode == CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME ||
428 errorCode == 429 errorCode ==
429 CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER; 430 CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER;
430 }); 431 });
431 } 432 }
432 } 433 }
433 434
434 /** 435 /**
435 * A task that builds implicit constructors for a [ClassElement], or keeps 436 * A task that builds implicit constructors for a [ClassElement], or keeps
436 * the existing explicit constructors if the class has them. 437 * the existing explicit constructors if the class has them.
437 */ 438 */
(...skipping 3002 matching lines...) Expand 10 before | Expand all | Expand 10 after
3440 @override 3441 @override
3441 bool moveNext() { 3442 bool moveNext() {
3442 if (_newSources.isEmpty) { 3443 if (_newSources.isEmpty) {
3443 return false; 3444 return false;
3444 } 3445 }
3445 currentTarget = _newSources.first; 3446 currentTarget = _newSources.first;
3446 _newSources.remove(currentTarget); 3447 _newSources.remove(currentTarget);
3447 return true; 3448 return true;
3448 } 3449 }
3449 } 3450 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698