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

Unified Diff: pkg/dev_compiler/lib/src/compiler/reify_coercions.dart

Issue 2545843002: Modify dev_compiler to use analyzer's new AstFactory class. (Closed)
Patch Set: Run dartfmt Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/reify_coercions.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/reify_coercions.dart b/pkg/dev_compiler/lib/src/compiler/reify_coercions.dart
index c0a9f723cdacd10fb60030aa21cd249d0e5675f4..595d540c30cb8ebf13f2485d91236cd8f93369ea 100644
--- a/pkg/dev_compiler/lib/src/compiler/reify_coercions.dart
+++ b/pkg/dev_compiler/lib/src/compiler/reify_coercions.dart
@@ -4,6 +4,7 @@
import 'package:analyzer/analyzer.dart' as analyzer;
import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/standard_ast_factory.dart';
import 'package:analyzer/dart/element/type.dart' show DartType;
import 'package:analyzer/src/dart/ast/ast.dart' show FunctionBodyImpl;
import 'package:analyzer/src/dart/ast/utilities.dart' show NodeReplacer;
@@ -40,7 +41,8 @@ class CoercionReifier extends analyzer.GeneralizingAstVisitor<Object> {
static Expression castExpression(Expression e, DartType toType) {
// We use an empty name in the AST, because the JS code generator only cares
// about the target type. It does not look at the AST name.
- var typeName = new TypeName(AstBuilder.identifierFromString(''), null);
+ var typeName =
+ astFactory.typeName(AstBuilder.identifierFromString(''), null);
typeName.type = toType;
var cast = AstBuilder.asExpression(e, typeName);
cast.staticType = toType;
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698