Chromium Code Reviews| Index: compiler/java/com/google/dart/compiler/ast/DartExpression.java |
| diff --git a/compiler/java/com/google/dart/compiler/ast/DartExpression.java b/compiler/java/com/google/dart/compiler/ast/DartExpression.java |
| index 9b0bb15a81cf9144ed77f6e9c1bb0e536950dacd..5a784ebb8bc702e57da52478b862b0b478827607 100644 |
| --- a/compiler/java/com/google/dart/compiler/ast/DartExpression.java |
| +++ b/compiler/java/com/google/dart/compiler/ast/DartExpression.java |
| @@ -4,10 +4,13 @@ |
| package com.google.dart.compiler.ast; |
| +import com.google.dart.compiler.type.Type; |
| + |
| /** |
| * Abstract base class for Dart expressions. |
| */ |
| public abstract class DartExpression extends DartNode { |
| + Type type; |
|
zundel
2011/10/14 01:54:28
I was advised to use getSymbol().getType(), but bi
|
| public boolean isAssignable() { |
| // By default you cannot assign to expressions. |
| @@ -18,4 +21,14 @@ public abstract class DartExpression extends DartNode { |
| public DartExpression getNormalizedNode() { |
| return (DartExpression) super.getNormalizedNode(); |
| } |
| + |
| + @Override |
| + public void setType(Type type) { |
| + this.type = type; |
| + } |
| + |
| + @Override |
| + public Type getType() { |
| + return type; |
| + } |
| } |