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

Unified Diff: pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart

Issue 2653203002: Use entities in CommonElements interface. (Closed)
Patch Set: Created 3 years, 11 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: pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
index 3f612d3ca002ddeadc0b828882e27cbdb5dd48c9..79eff9ac5d79f63e099f90313b26974df45720af 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
@@ -29,6 +29,7 @@ import '../../elements/elements.dart'
ParameterElement,
TypedefElement,
VariableElement;
+import '../../elements/types.dart' show DartType;
import '../../js/js.dart' as js;
import '../../js_backend/backend_helpers.dart' show BackendHelpers;
import '../../js_backend/js_backend.dart'
@@ -396,8 +397,8 @@ class ProgramBuilder {
if (returnType.isFunctionType) {
functionType = returnType;
} else if (returnType.treatAsDynamic ||
- _compiler.types.isSubtype(
- returnType, backend.commonElements.functionType)) {
+ _compiler.types.isSubtype(returnType,
+ backend.commonElements.functionType as DartType)) {
if (returnType.isTypedef) {
ResolutionTypedefType typedef = returnType;
// TODO(jacobr): can we just use typdef.unaliased instead?

Powered by Google App Engine
This is Rietveld 408576698