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

Unified Diff: frog/type.dart

Issue 8536056: better errors and error locations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | « frog/member.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/type.dart
diff --git a/frog/type.dart b/frog/type.dart
index 8399dcc398ffa2b41839ccff3b2970df7ab090f4..1fd10fa339a1457705b62a926937020c4b281fb5 100644
--- a/frog/type.dart
+++ b/frog/type.dart
@@ -1146,16 +1146,19 @@ class DefinedType extends Type {
return ret;
} else {
for (var t in subtypes) {
- var m;
if (!isClass && t.isClass) {
// If this is an interface, the actual implementation may
// come from a class that does not implement this interface.
// TODO(vsm): Use a more efficient lookup strategy.
- m = t.getMember(memberName);
+ // TODO(jimhug): This is made uglier by need to avoid dups.
+ final m = t.getMember(memberName);
+ if (m != null && ret.members.indexOf(m) == -1) {
+ ret.add(m);
+ }
} else {
- m = t.members[memberName];
+ final m = t.members[memberName];
+ if (m != null) ret.add(m);
}
- if (m != null) ret.add(m);
}
return ret;
}
« no previous file with comments | « frog/member.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698