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/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
(...skipping 6251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6262 RecordingErrorListener errorListener = new RecordingErrorListener(); | 6262 RecordingErrorListener errorListener = new RecordingErrorListener(); |
6263 // | 6263 // |
6264 // Prepare inputs. | 6264 // Prepare inputs. |
6265 // | 6265 // |
6266 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); | 6266 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); |
6267 CompilationUnit unit = getRequiredInput(UNIT_INPUT); | 6267 CompilationUnit unit = getRequiredInput(UNIT_INPUT); |
6268 AnalysisOptionsImpl options = context.analysisOptions; | 6268 AnalysisOptionsImpl options = context.analysisOptions; |
6269 if (options.strongMode) { | 6269 if (options.strongMode) { |
6270 CodeChecker checker = new CodeChecker( | 6270 CodeChecker checker = new CodeChecker( |
6271 typeProvider, | 6271 typeProvider, |
6272 new StrongTypeSystemImpl(implicitCasts: options.implicitCasts), | 6272 new StrongTypeSystemImpl( |
| 6273 implicitCasts: options.implicitCasts, |
| 6274 nonnullableTypes: options.nonnullableTypes), |
6273 errorListener, | 6275 errorListener, |
6274 options); | 6276 options); |
6275 checker.visitCompilationUnit(unit); | 6277 checker.visitCompilationUnit(unit); |
6276 } | 6278 } |
6277 // | 6279 // |
6278 // Record outputs. | 6280 // Record outputs. |
6279 // | 6281 // |
6280 outputs[STRONG_MODE_ERRORS] = getUniqueErrors(errorListener.errors); | 6282 outputs[STRONG_MODE_ERRORS] = getUniqueErrors(errorListener.errors); |
6281 outputs[CREATED_RESOLVED_UNIT] = true; | 6283 outputs[CREATED_RESOLVED_UNIT] = true; |
6282 outputs[RESOLVED_UNIT] = unit; | 6284 outputs[RESOLVED_UNIT] = unit; |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6576 | 6578 |
6577 @override | 6579 @override |
6578 bool moveNext() { | 6580 bool moveNext() { |
6579 if (_newSources.isEmpty) { | 6581 if (_newSources.isEmpty) { |
6580 return false; | 6582 return false; |
6581 } | 6583 } |
6582 currentTarget = _newSources.removeLast(); | 6584 currentTarget = _newSources.removeLast(); |
6583 return true; | 6585 return true; |
6584 } | 6586 } |
6585 } | 6587 } |
OLD | NEW |