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 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
(...skipping 5472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5483 // Prepare inputs. | 5483 // Prepare inputs. |
5484 // | 5484 // |
5485 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); | 5485 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); |
5486 CompilationUnit unit = getRequiredInput(UNIT_INPUT); | 5486 CompilationUnit unit = getRequiredInput(UNIT_INPUT); |
5487 AnalysisOptionsImpl options = context.analysisOptions; | 5487 AnalysisOptionsImpl options = context.analysisOptions; |
5488 if (options.strongMode) { | 5488 if (options.strongMode) { |
5489 CodeChecker checker = new CodeChecker( | 5489 CodeChecker checker = new CodeChecker( |
5490 typeProvider, | 5490 typeProvider, |
5491 new StrongTypeSystemImpl(typeProvider, | 5491 new StrongTypeSystemImpl(typeProvider, |
5492 implicitCasts: options.implicitCasts, | 5492 implicitCasts: options.implicitCasts, |
| 5493 declarationCasts: options.declarationCasts, |
5493 nonnullableTypes: options.nonnullableTypes), | 5494 nonnullableTypes: options.nonnullableTypes), |
5494 errorListener, | 5495 errorListener, |
5495 options); | 5496 options); |
5496 checker.visitCompilationUnit(unit); | 5497 checker.visitCompilationUnit(unit); |
5497 } | 5498 } |
5498 // | 5499 // |
5499 // Record outputs. | 5500 // Record outputs. |
5500 // | 5501 // |
5501 outputs[STRONG_MODE_ERRORS] = getUniqueErrors(errorListener.errors); | 5502 outputs[STRONG_MODE_ERRORS] = getUniqueErrors(errorListener.errors); |
5502 outputs[CREATED_RESOLVED_UNIT] = true; | 5503 outputs[CREATED_RESOLVED_UNIT] = true; |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5868 | 5869 |
5869 @override | 5870 @override |
5870 bool moveNext() { | 5871 bool moveNext() { |
5871 if (_newSources.isEmpty) { | 5872 if (_newSources.isEmpty) { |
5872 return false; | 5873 return false; |
5873 } | 5874 } |
5874 currentTarget = _newSources.removeLast(); | 5875 currentTarget = _newSources.removeLast(); |
5875 return true; | 5876 return true; |
5876 } | 5877 } |
5877 } | 5878 } |
OLD | NEW |