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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 1797063002: Resolve obvious deprecation warnings on bleeding edge (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index ea3c8e14548952286d5ed32d9f0b76516b467afb..8e9f05a8fcf00b254c0eb32ab55cde3c228a1119 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -6,9 +6,15 @@ import 'dart:collection' show HashSet, HashMap, SplayTreeSet;
import 'package:analyzer/analyzer.dart' hide ConstantEvaluator;
import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/src/generated/ast.dart' hide ConstantEvaluator;
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/visitor.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/dart/ast/ast.dart' hide ConstantEvaluator;
import 'package:analyzer/src/generated/constant.dart';
-import 'package:analyzer/src/generated/element.dart';
+//TODO(leafp): Remove deprecated dependency
+//ignore: DEPRECATED_MEMBER_USE
+import 'package:analyzer/src/generated/element.dart'
+ show DynamicElementImpl, DynamicTypeImpl, LocalVariableElementImpl;
Leaf 2016/03/14 22:47:55 There's no DynamicElement, should there be? We
Jennifer Messerly 2016/03/14 23:12:42 We use this in one place: // type literal
Leaf 2016/03/14 23:58:42 It does. But so does TypeParameterElement, which
Brian Wilkerson 2016/03/15 00:14:16 I made it that way because a type parameter define
Leaf 2016/03/15 00:35:14 Sorry - I meant that it might be a bug in the code
Jennifer Messerly 2016/03/15 16:23:18 +1, I think it's a bug in the code generator. You
import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
import 'package:analyzer/src/dart/ast/token.dart'
@@ -497,7 +503,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor
// Create constructor and initialize index
var constructor = new JS.Method(
name, js.call('function(index) { this.index = index; }') as JS.Fun);
- var fields = new List<ConstFieldElementImpl>.from(
Leaf 2016/03/14 22:47:55 There is no ConstFieldElement. Using FieldElement
Jennifer Messerly 2016/03/14 23:12:42 seems to still be there? https://github.com/dart-l
Leaf 2016/03/14 23:58:42 There's a ConstFieldElementImpl (which is in the p
+ var fields = new List<FieldElement>.from(
element.fields.where((f) => f.type == type));
// Create toString() method

Powered by Google App Engine
This is Rietveld 408576698