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

Unified Diff: frog/leg/resolver.dart

Issue 8949039: Make sure a class is resolved before looking up its elements. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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
Index: frog/leg/resolver.dart
===================================================================
--- frog/leg/resolver.dart (revision 2693)
+++ frog/leg/resolver.dart (working copy)
@@ -308,7 +308,7 @@
return null;
} else if (receiver.kind === ElementKind.CLASS) {
ClassElement receiverClass = receiver;
- target = receiverClass.lookupLocalElement(name);
+ target = receiverClass.resolve(compiler).lookupLocalElement(name);
if (target == null) {
error(node, MessageKind.METHOD_NOT_FOUND, [receiver, name]);
} else if (target.isInstanceMember()) {
@@ -412,10 +412,7 @@
if (cls !== null) {
// TODO(ngeoffray): set constructor-name correctly.
SourceString name = cls.name;
- // TODO(ngeoffray): define what isResolved means. Also, pass the
- // needed element to resolve?
- if (!cls.isResolved) compiler.resolveType(cls);
- constructor = cls.lookupLocalElement(name);
+ constructor = cls.resolve(compiler).lookupLocalElement(name);
if (name == cls.name
&& constructor === null
&& node.send.argumentsNode.isEmpty()) {
@@ -562,8 +559,6 @@
final Element element;
final Scope parent;
- Map<SourceString, Element> get elements() => const {};
-
Scope(this.parent, this.element);
abstract Element add(Element element);
abstract Element lookup(Element element);

Powered by Google App Engine
This is Rietveld 408576698