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

Unified Diff: pkg/compiler/lib/src/resolution/resolution.dart

Issue 2669703003: Refactor ConstantExpression/ConstantConstructor to use entities. (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/resolution/resolution.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index b844779104f284bc83e800cca59af1db8162669c..3459bb74190c5eb705ef0aab2476c77529bd7df4 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -1083,8 +1083,8 @@ class ResolverTask extends CompilerTask {
switch (constant.kind) {
case ConstantExpressionKind.CONSTRUCTED:
ConstructedConstantExpression constructedConstant = constant;
- if (constructedConstant.type.isGeneric &&
- !constructedConstant.type.isRaw) {
+ ResolutionInterfaceType type = constructedConstant.type;
+ if (type.isGeneric && !type.isRaw) {
// Const constructor calls cannot have type arguments.
// TODO(24312): Remove this.
reporter.reportErrorMessage(
@@ -1092,7 +1092,7 @@ class ResolverTask extends CompilerTask {
constant = new ErroneousConstantExpression();
}
break;
- case ConstantExpressionKind.VARIABLE:
+ case ConstantExpressionKind.FIELD:
case ConstantExpressionKind.ERRONEOUS:
break;
default:
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/serialization/constant_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698