| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.generated.resolver; | 5 library analyzer.src.generated.resolver; |
| 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 3672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3683 // if(true) ... | 3683 // if(true) ... |
| 3684 return _nodeExits(thenStatement); | 3684 return _nodeExits(thenStatement); |
| 3685 } else if (elseStatement != null) { | 3685 } else if (elseStatement != null) { |
| 3686 // if (false) ... | 3686 // if (false) ... |
| 3687 return _nodeExits(elseStatement); | 3687 return _nodeExits(elseStatement); |
| 3688 } | 3688 } |
| 3689 } | 3689 } |
| 3690 if (thenStatement == null || elseStatement == null) { | 3690 if (thenStatement == null || elseStatement == null) { |
| 3691 return false; | 3691 return false; |
| 3692 } | 3692 } |
| 3693 return _nodeExits(thenStatement) && _nodeExits(elseStatement); | 3693 bool thenExits = _nodeExits(thenStatement); |
| 3694 bool elseExits = _nodeExits(elseStatement); |
| 3695 return thenExits && elseExits; |
| 3694 } | 3696 } |
| 3695 | 3697 |
| 3696 @override | 3698 @override |
| 3697 bool visitIndexExpression(IndexExpression node) { | 3699 bool visitIndexExpression(IndexExpression node) { |
| 3698 Expression target = node.realTarget; | 3700 Expression target = node.realTarget; |
| 3699 if (_nodeExits(target)) { | 3701 if (_nodeExits(target)) { |
| 3700 return true; | 3702 return true; |
| 3701 } | 3703 } |
| 3702 if (_nodeExits(node.index)) { | 3704 if (_nodeExits(node.index)) { |
| 3703 return true; | 3705 return true; |
| (...skipping 7275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10979 return null; | 10981 return null; |
| 10980 } | 10982 } |
| 10981 if (identical(node.staticElement, variable)) { | 10983 if (identical(node.staticElement, variable)) { |
| 10982 if (node.inSetterContext()) { | 10984 if (node.inSetterContext()) { |
| 10983 result = true; | 10985 result = true; |
| 10984 } | 10986 } |
| 10985 } | 10987 } |
| 10986 return null; | 10988 return null; |
| 10987 } | 10989 } |
| 10988 } | 10990 } |
| OLD | NEW |