| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 'VERIFY_ERRORS', AnalysisError.NO_ERRORS); | 416 'VERIFY_ERRORS', AnalysisError.NO_ERRORS); |
| 417 | 417 |
| 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 || |
| 428 errorCode == |
| 429 CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER; |
| 427 }); | 430 }); |
| 428 } | 431 } |
| 429 } | 432 } |
| 430 | 433 |
| 431 /** | 434 /** |
| 432 * A task that builds implicit constructors for a [ClassElement], or keeps | 435 * A task that builds implicit constructors for a [ClassElement], or keeps |
| 433 * the existing explicit constructors if the class has them. | 436 * the existing explicit constructors if the class has them. |
| 434 */ | 437 */ |
| 435 class BuildClassConstructorsTask extends SourceBasedAnalysisTask { | 438 class BuildClassConstructorsTask extends SourceBasedAnalysisTask { |
| 436 /** | 439 /** |
| (...skipping 2991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3428 @override | 3431 @override |
| 3429 bool moveNext() { | 3432 bool moveNext() { |
| 3430 if (_newSources.isEmpty) { | 3433 if (_newSources.isEmpty) { |
| 3431 return false; | 3434 return false; |
| 3432 } | 3435 } |
| 3433 currentTarget = _newSources.first; | 3436 currentTarget = _newSources.first; |
| 3434 _newSources.remove(currentTarget); | 3437 _newSources.remove(currentTarget); |
| 3435 return true; | 3438 return true; |
| 3436 } | 3439 } |
| 3437 } | 3440 } |
| OLD | NEW |