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 // TODO(jmesserly): this was ported from package:dev_compiler, and needs to be | 5 // TODO(jmesserly): this was ported from package:dev_compiler, and needs to be |
6 // refactored to fit into analyzer. | 6 // refactored to fit into analyzer. |
7 library analyzer.src.task.strong.checker; | 7 library analyzer.src.task.strong.checker; |
8 | 8 |
9 import 'package:analyzer/analyzer.dart'; | 9 import 'package:analyzer/analyzer.dart'; |
10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
11 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType; | 11 import 'package:analyzer/dart/ast/token.dart' show TokenType; |
12 import 'package:analyzer/dart/ast/visitor.dart'; | 12 import 'package:analyzer/dart/ast/visitor.dart'; |
13 import 'package:analyzer/dart/element/element.dart'; | 13 import 'package:analyzer/dart/element/element.dart'; |
14 import 'package:analyzer/dart/element/type.dart'; | 14 import 'package:analyzer/dart/element/type.dart'; |
15 import 'package:analyzer/src/dart/element/element.dart'; | 15 import 'package:analyzer/src/dart/element/element.dart'; |
16 import 'package:analyzer/src/dart/element/type.dart'; | 16 import 'package:analyzer/src/dart/element/type.dart'; |
17 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; | 17 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; |
18 import 'package:analyzer/src/generated/type_system.dart'; | 18 import 'package:analyzer/src/generated/type_system.dart'; |
19 | 19 |
20 import 'info.dart'; | 20 import 'info.dart'; |
21 | 21 |
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 } while (!current.isObject && !visited.contains(current)); | 1302 } while (!current.isObject && !visited.contains(current)); |
1303 } | 1303 } |
1304 | 1304 |
1305 void _recordMessage(StaticInfo info) { | 1305 void _recordMessage(StaticInfo info) { |
1306 if (info == null) return; | 1306 if (info == null) return; |
1307 var error = info.toAnalysisError(); | 1307 var error = info.toAnalysisError(); |
1308 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true; | 1308 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true; |
1309 _reporter.onError(error); | 1309 _reporter.onError(error); |
1310 } | 1310 } |
1311 } | 1311 } |
OLD | NEW |