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

Unified Diff: pkg/compiler/lib/src/constants/expressions.dart

Issue 2610513005: Use Entity instead of Element in ConstantValue (Closed)
Patch Set: Created 3 years, 12 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 | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | pkg/compiler/lib/src/constants/values.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/constants/expressions.dart
diff --git a/pkg/compiler/lib/src/constants/expressions.dart b/pkg/compiler/lib/src/constants/expressions.dart
index f68dbe1f95f1b7a1aef44a7c26db1c9c80345c28..deb274da86163720bc67fa54bddc69d2f614fa23 100644
--- a/pkg/compiler/lib/src/constants/expressions.dart
+++ b/pkg/compiler/lib/src/constants/expressions.dart
@@ -12,7 +12,7 @@ import '../elements/elements.dart'
show
ConstructorElement,
FieldElement,
- FunctionElement,
+ MethodElement,
PrefixElement,
VariableElement;
import '../resolution/operators.dart';
@@ -813,7 +813,7 @@ class VariableConstantExpression extends ConstantExpression {
/// Reference to a top-level or static function.
class FunctionConstantExpression extends ConstantExpression {
- final FunctionElement element;
+ final MethodElement element;
FunctionConstantExpression(this.element);
@@ -831,7 +831,7 @@ class FunctionConstantExpression extends ConstantExpression {
@override
ConstantValue evaluate(
Environment environment, ConstantSystem constantSystem) {
- return new FunctionConstantValue(element);
+ return new FunctionConstantValue(element, element.type);
}
@override
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | pkg/compiler/lib/src/constants/values.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698