| Index: compiler/java/com/google/dart/compiler/ast/ASTNodes.java
|
| diff --git a/compiler/java/com/google/dart/compiler/ast/ASTNodes.java b/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
|
| index 104b56c8a9044ddcada92de9bfd5760df5c8837e..82bc8559b9fcfde6da0cc261ab0b89b8af532c03 100644
|
| --- a/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
|
| +++ b/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
|
| @@ -37,10 +37,10 @@ import java.util.List;
|
| public class ASTNodes {
|
|
|
| /**
|
| - * @return <code>true</code> if given {@link DartNode} is part of static method or top-level
|
| - * function.
|
| + * @return <code>true</code> if given {@link DartNode} is part of static method, static field or
|
| + * top-level function.
|
| */
|
| - public static boolean isStaticContext(DartNode node ) {
|
| + public static boolean isStaticContext(DartNode node) {
|
| while (node != null) {
|
| DartNode parent = node.getParent();
|
| if (node instanceof DartMethodDefinition) {
|
| @@ -52,7 +52,7 @@ public class ASTNodes {
|
| }
|
| if (node instanceof DartField) {
|
| DartField field = (DartField) node;
|
| - if (field.getModifiers().isStatic() || field.getModifiers().isConstant()) {
|
| + if (field.getModifiers().isStatic()) {
|
| return true;
|
| }
|
| return parent != null && parent.getParent() instanceof DartUnit;
|
|
|