| 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 6779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6790 node.initializer != null) { | 6790 node.initializer != null) { |
| 6791 (element as ConstVariableElement).constantInitializer = | 6791 (element as ConstVariableElement).constantInitializer = |
| 6792 new ConstantAstCloner().cloneNode(node.initializer); | 6792 new ConstantAstCloner().cloneNode(node.initializer); |
| 6793 } | 6793 } |
| 6794 return null; | 6794 return null; |
| 6795 } | 6795 } |
| 6796 | 6796 |
| 6797 @override | 6797 @override |
| 6798 visitVariableDeclarationList(VariableDeclarationList node) { | 6798 visitVariableDeclarationList(VariableDeclarationList node) { |
| 6799 for (VariableDeclaration decl in node.variables) { | 6799 for (VariableDeclaration decl in node.variables) { |
| 6800 InferenceContext.setType(decl, node.type?.type); | 6800 InferenceContext.setType(decl, decl.element?.type); |
| 6801 } | 6801 } |
| 6802 super.visitVariableDeclarationList(node); | 6802 super.visitVariableDeclarationList(node); |
| 6803 } | 6803 } |
| 6804 | 6804 |
| 6805 @override | 6805 @override |
| 6806 Object visitWhileStatement(WhileStatement node) { | 6806 Object visitWhileStatement(WhileStatement node) { |
| 6807 // Note: since we don't call the base class, we have to maintain | 6807 // Note: since we don't call the base class, we have to maintain |
| 6808 // _implicitLabelScope ourselves. | 6808 // _implicitLabelScope ourselves. |
| 6809 ImplicitLabelScope outerImplicitScope = _implicitLabelScope; | 6809 ImplicitLabelScope outerImplicitScope = _implicitLabelScope; |
| 6810 try { | 6810 try { |
| (...skipping 3965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10776 return null; | 10776 return null; |
| 10777 } | 10777 } |
| 10778 if (identical(node.staticElement, variable)) { | 10778 if (identical(node.staticElement, variable)) { |
| 10779 if (node.inSetterContext()) { | 10779 if (node.inSetterContext()) { |
| 10780 result = true; | 10780 result = true; |
| 10781 } | 10781 } |
| 10782 } | 10782 } |
| 10783 return null; | 10783 return null; |
| 10784 } | 10784 } |
| 10785 } | 10785 } |
| OLD | NEW |