Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: lib/src/compiler/reify_coercions.dart

Issue 1969063002: copy TypeName.type when we clone the AST (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« lib/src/compiler/code_generator.dart ('K') | « lib/src/compiler/code_generator.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698