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 import 'package:analyzer/analyzer.dart' as analyzer; | 5 import 'package:analyzer/analyzer.dart' as analyzer; |
6 import 'package:analyzer/dart/ast/ast.dart'; | 6 import 'package:analyzer/dart/ast/ast.dart'; |
7 import 'package:analyzer/dart/element/type.dart' show DartType; | 7 import 'package:analyzer/dart/element/type.dart' show DartType; |
8 import 'package:analyzer/src/dart/ast/ast.dart' show FunctionBodyImpl; | 8 import 'package:analyzer/src/dart/ast/ast.dart' show FunctionBodyImpl; |
9 import 'package:analyzer/src/dart/ast/utilities.dart' show NodeReplacer; | 9 import 'package:analyzer/src/dart/ast/utilities.dart' show NodeReplacer; |
10 import 'package:analyzer/src/dart/element/type.dart' show DynamicTypeImpl; | 10 import 'package:analyzer/src/dart/element/type.dart' show DynamicTypeImpl; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 } | 156 } |
157 | 157 |
158 @override | 158 @override |
159 ExpressionFunctionBody visitExpressionFunctionBody( | 159 ExpressionFunctionBody visitExpressionFunctionBody( |
160 ExpressionFunctionBody node) { | 160 ExpressionFunctionBody node) { |
161 var clone = super.visitExpressionFunctionBody(node); | 161 var clone = super.visitExpressionFunctionBody(node); |
162 (clone as FunctionBodyImpl).localVariableInfo = | 162 (clone as FunctionBodyImpl).localVariableInfo = |
163 (node as FunctionBodyImpl).localVariableInfo; | 163 (node as FunctionBodyImpl).localVariableInfo; |
164 return clone; | 164 return clone; |
165 } | 165 } |
| 166 |
| 167 // TODO(jmesserly): workaround for |
| 168 // https://github.com/dart-lang/sdk/issues/26368 |
| 169 @override |
| 170 TypeName visitTypeName(TypeName node) { |
| 171 var clone = super.visitTypeName(node); |
| 172 clone.type = node.type; |
| 173 return clone; |
| 174 } |
166 } | 175 } |
OLD | NEW |