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

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
« no previous file with comments | « frog/leg/elements/elements.dart ('k') | frog/tests/leg_only/src/StaticField2Test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
ngeoffray 2011/12/21 13:17:06 I will deal with lookupLocalElement -> lookupEleme
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()) {
« no previous file with comments | « frog/leg/elements/elements.dart ('k') | frog/tests/leg_only/src/StaticField2Test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698