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 engine.resolver; | 5 library engine.resolver; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'ast.dart'; | 9 import 'ast.dart'; |
10 import 'constant.dart'; | 10 import 'constant.dart'; |
(...skipping 9658 matching lines...) Loading... |
9669 @override | 9669 @override |
9670 Object visitExpressionFunctionBody(ExpressionFunctionBody node) { | 9670 Object visitExpressionFunctionBody(ExpressionFunctionBody node) { |
9671 if (_shouldBeSkipped(node)) { | 9671 if (_shouldBeSkipped(node)) { |
9672 return null; | 9672 return null; |
9673 } | 9673 } |
9674 return super.visitExpressionFunctionBody(node); | 9674 return super.visitExpressionFunctionBody(node); |
9675 } | 9675 } |
9676 | 9676 |
9677 @override | 9677 @override |
9678 Object visitFieldDeclaration(FieldDeclaration node) { | 9678 Object visitFieldDeclaration(FieldDeclaration node) { |
9679 if (strongMode) { | 9679 if (strongMode && node.isStatic) { |
9680 _addVariables(node.fields.variables); | 9680 _addVariables(node.fields.variables); |
9681 bool wasDiscarding = discardErrorsInInitializer; | 9681 bool wasDiscarding = discardErrorsInInitializer; |
9682 discardErrorsInInitializer = true; | 9682 discardErrorsInInitializer = true; |
9683 try { | 9683 try { |
9684 return super.visitFieldDeclaration(node); | 9684 return super.visitFieldDeclaration(node); |
9685 } finally { | 9685 } finally { |
9686 discardErrorsInInitializer = wasDiscarding; | 9686 discardErrorsInInitializer = wasDiscarding; |
9687 } | 9687 } |
9688 } | 9688 } |
9689 return super.visitFieldDeclaration(node); | 9689 return super.visitFieldDeclaration(node); |
(...skipping 6256 matching lines...) Loading... |
15946 nonFields.add(node); | 15946 nonFields.add(node); |
15947 return null; | 15947 return null; |
15948 } | 15948 } |
15949 | 15949 |
15950 @override | 15950 @override |
15951 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 15951 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
15952 | 15952 |
15953 @override | 15953 @override |
15954 Object visitWithClause(WithClause node) => null; | 15954 Object visitWithClause(WithClause node) => null; |
15955 } | 15955 } |
OLD | NEW |