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

Unified Diff: compiler/java/com/google/dart/compiler/ast/ASTNodes.java

Issue 12593009: Don't cast to NodeElement where not needed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file. Created 7 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
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/ast/DartIdentifier.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 88a322f24edf282cca9233d1734ab20c8c351159..2e3b87f062b1bef0d5fecae391eac85820e85c70 100644
--- a/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
+++ b/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
@@ -21,7 +21,6 @@ import com.google.dart.compiler.resolver.Element;
import com.google.dart.compiler.resolver.ElementKind;
import com.google.dart.compiler.resolver.FieldElement;
import com.google.dart.compiler.resolver.MethodElement;
-import com.google.dart.compiler.resolver.NodeElement;
import com.google.dart.compiler.resolver.VariableElement;
import com.google.dart.compiler.type.InterfaceType;
import com.google.dart.compiler.type.Type;
@@ -196,7 +195,7 @@ public class ASTNodes {
* {@link DartIdentifier} is the field reference, or <code>null</code> in the other case.
*/
public static FieldElement getFieldElement(DartIdentifier node) {
- NodeElement element = node.getElement();
+ Element element = node.getElement();
if (ElementKind.of(element) == ElementKind.FIELD) {
return (FieldElement) element;
}
@@ -867,7 +866,7 @@ public class ASTNodes {
* other case.
*/
public static VariableElement getVariableElement(DartIdentifier node) {
- NodeElement element = node.getElement();
+ Element element = node.getElement();
if (ElementKind.of(element) == ElementKind.VARIABLE) {
return (VariableElement) element;
}
@@ -880,7 +879,7 @@ public class ASTNodes {
* local variable or parameter, or <code>null</code> in the other case.
*/
public static VariableElement getVariableOrParameterElement(DartIdentifier node) {
- NodeElement element = node.getElement();
+ Element element = node.getElement();
if (element instanceof VariableElement) {
return (VariableElement) element;
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/ast/DartIdentifier.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698