| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |