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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/HasConstantTypeSetter.java

Issue 9689063: Visit Node in CompileTimeConstantAnalyzer only if Node based (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: compiler/java/com/google/dart/compiler/resolver/HasConstantTypeSetter.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/HasConstantTypeSetter.java b/compiler/java/com/google/dart/compiler/resolver/HasConstantTypeSetter.java
new file mode 100644
index 0000000000000000000000000000000000000000..45d0c566a6f99e75d6c4a5b75acda004cea95cee
--- /dev/null
+++ b/compiler/java/com/google/dart/compiler/resolver/HasConstantTypeSetter.java
@@ -0,0 +1,20 @@
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
zundel 2012/03/13 17:10:34 2012
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package com.google.dart.compiler.resolver;
+
+import com.google.dart.compiler.type.Type;
+
+/**
+ * Optional interface of {@link FieldElement} which can remember {@link Type} of constant. Note that
+ * it also extends {@link NodeElement} because we can set {@link Type} only if we can infer it from
+ * the AST.
+ */
+public interface HasConstantTypeSetter extends NodeElement {
+ /**
+ * Sets the inferred type of this constant.
+ *
+ * @param type the {@link Type} to set, not <code>null</code>.
+ */
+ void setConstantType(Type type);
+}

Powered by Google App Engine
This is Rietveld 408576698