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

Unified Diff: lib/compiler/implementation/elements/elements.dart

Issue 10378033: Fix findMyName by comparing the kind and not the token to EOF_TOKEN. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/elements/elements.dart
diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
index 95109ae759d0d399ec0d084b6f43c0b437120f99..0b9fca1014c852c45d5715f9bc5717251d906b35 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -141,7 +141,7 @@ class Element implements Hashable {
Token position() => null;
Token findMyName(Token token) {
- for (Token t = token; t !== EOF_TOKEN; t = t.next) {
+ for (Token t = token; t.kind !== EOF_TOKEN; t = t.next) {
if (t.value == name) return t;
}
return token;
@@ -799,7 +799,7 @@ class ClassElement extends ContainerElement {
}
}
classElement = includeSuperMembers ? classElement.superclass : null;
- } while(classElement !== null);
+ } while(classElement !== null);
}
/**
@@ -815,7 +815,7 @@ class ClassElement extends ContainerElement {
void forEachInstanceField([void f(ClassElement enclosingClass, Element field),
includeBackendMembers = false,
includeSuperMembers = false]) {
- // Filters so that [f] is only invoked with instance fields.
+ // Filters so that [f] is only invoked with instance fields.
void fieldFilter(ClassElement enclosingClass, Element member) {
if (member.isInstanceMember() && member.kind == ElementKind.FIELD) {
f(enclosingClass, member);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698