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

Unified Diff: lib/src/compiler/code_generator.dart

Issue 2048463002: enable compatiblity with 1.18 SDKs (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | pubspec.lock » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/code_generator.dart
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart
index 3969091deb2a31d8602eba929acaafc2f8f61844..be0dc06fd553c9d925704116ea161195f880a5ff 100644
--- a/lib/src/compiler/code_generator.dart
+++ b/lib/src/compiler/code_generator.dart
@@ -11,10 +11,9 @@ import 'package:analyzer/dart/ast/token.dart' show Token, TokenType;
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/ast/token.dart' show StringToken;
-//TODO(leafp): Remove deprecated dependency
-//ignore: DEPRECATED_MEMBER_USE
-import 'package:analyzer/src/generated/element.dart'
- show DynamicTypeImpl, LocalVariableElementImpl;
+import 'package:analyzer/src/dart/element/element.dart'
+ show LocalVariableElementImpl;
+import 'package:analyzer/src/dart/element/type.dart' show DynamicTypeImpl;
import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
import 'package:analyzer/src/generated/resolver.dart'
show TypeProvider, NamespaceBuilder;
@@ -291,6 +290,7 @@ class CodeGenerator extends GeneralizingAstVisitor
case ModuleFormat.es6:
return module;
}
+ return null; // unreachable. It is here to suppress a bogus Analyzer message
}
List<String> _getJSName(Element e) {
@@ -2169,7 +2169,6 @@ class CodeGenerator extends GeneralizingAstVisitor
} else {
return js.call('dart.fn(#, #)', [fn, typeRep]);
}
- throw 'Function has non function type: $type';
}
/// Emits an arrow FunctionExpression node.
« no previous file with comments | « no previous file | pubspec.lock » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698