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

Unified Diff: dart/frog/leg/resolver.dart

Issue 9417031: Mock up all remaining core library implementation classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 10 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 | « dart/frog/leg/lib/mockimpl.dart ('k') | dart/frog/leg/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/resolver.dart
diff --git a/dart/frog/leg/resolver.dart b/dart/frog/leg/resolver.dart
index 1e378adb9e42588d5a4ea29c922695106edd0b5e..af36a18debfcb81f049e1c62674386bad4b2f4a3 100644
--- a/dart/frog/leg/resolver.dart
+++ b/dart/frog/leg/resolver.dart
@@ -123,14 +123,10 @@ class ResolverTask extends CompilerTask {
&& constructor.functionParameters.parameterCount === 0) {
constructor.implementation = defaultClass.getSynthesizedConstructor();
}
- }
- if (constructor === null) {
- error(node.send, MessageKind.CANNOT_FIND_CONSTRUCTOR, [node.send]);
- return null;
- }
- if (constructor.implementation === null) {
- error(node, MessageKind.CANNOT_FIND_CONSTRUCTOR, [name]);
+ if (constructor.implementation === null) {
+ error(node, MessageKind.CANNOT_FIND_CONSTRUCTOR, [name]);
+ }
}
}
@@ -661,7 +657,7 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
SourceString name = node.selector.asIdentifier().source;
if (node.receiver === null) {
target = lookup(node, name);
- if (target === null && !enclosingElement.isInstanceMember()) {
+ if (target === null && !inInstanceContext) {
error(node, MessageKind.CANNOT_RESOLVE, [name]);
}
} else if (node.isSuperCall) {
@@ -1234,6 +1230,12 @@ class SignatureResolver extends CommonResolverVisitor<Element> {
return element;
}
+ Element visitFunctionExpression(FunctionExpression node) {
+ // This is a function typed parameter.
+ // TODO(ahe): Resolve the function type.
+ return visit(node.name);
+ }
+
LinkBuilder<Element> analyzeNodes(Link<Node> link) {
LinkBuilder<Element> elements = new LinkBuilder<Element>();
for (; !link.isEmpty(); link = link.tail) {
« no previous file with comments | « dart/frog/leg/lib/mockimpl.dart ('k') | dart/frog/leg/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698