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

Unified Diff: lib/src/utils.dart

Issue 1797063002: Resolve obvious deprecation warnings on bleeding edge (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Add test 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
« no previous file with comments | « lib/src/server/dependency_graph.dart ('k') | test/codegen/expect/misc.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 15b06aac0c6bea4588ef64936489e754e87ce146..5ff9558daaa2537eec8d5371643269dee8575898 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -6,7 +6,7 @@
import 'dart:io';
import 'package:path/path.dart' as path;
-import 'package:analyzer/src/generated/ast.dart'
+import 'package:analyzer/dart/ast/ast.dart'
show
ImportDirective,
ExportDirective,
@@ -18,8 +18,12 @@ import 'package:analyzer/src/generated/ast.dart'
Expression,
SimpleIdentifier,
MethodInvocation;
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/generated/constant.dart' show DartObject;
-import 'package:analyzer/src/generated/element.dart';
+//TODO(leafp): Remove deprecated dependency
+//ignore: DEPRECATED_MEMBER_USE
+import 'package:analyzer/src/generated/element.dart' show DynamicTypeImpl;
import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
import 'package:analyzer/src/generated/error.dart' show ErrorCode;
import 'package:analyzer/src/task/dart.dart' show ParseDartTask;
@@ -472,6 +476,9 @@ class FileSystem {
}
}
+//TODO(leafp): Is this really necessary? In theory I think
+// the static type should always be filled in for resolved
+// ASTs. This may be a vestigial workaround.
DartType getStaticType(Expression e) =>
e.staticType ?? DynamicTypeImpl.instance;
« no previous file with comments | « lib/src/server/dependency_graph.dart ('k') | test/codegen/expect/misc.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698