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

Unified Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 812523002: Change signature of lookupConstructor to only require a name. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: return null for unresolved default constructors Created 5 years, 11 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 | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index d33f3f0cbb602f92e79bb9b5470684d50b925f83..c0859a619428a293949d36bfa174f24d5e2f0af7 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -1465,7 +1465,7 @@ class InitializerResolver {
Selector constructorSelector =
visitor.getRedirectingThisOrSuperConstructorSelector(call);
FunctionElement calledConstructor =
- lookupTarget.lookupConstructor(constructorSelector);
+ lookupTarget.lookupConstructor(constructorSelector.name);
final bool isImplicitSuperCall = false;
final String className = lookupTarget.name;
@@ -1503,7 +1503,7 @@ class InitializerResolver {
Selector constructorSelector = new Selector.callDefaultConstructor(
visitor.enclosingElement.library);
Element calledConstructor = lookupTarget.lookupConstructor(
- constructorSelector);
+ constructorSelector.name);
final String className = lookupTarget.name;
final bool isImplicitSuperCall = true;
@@ -2333,7 +2333,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
Selector selector =
getRedirectingThisOrSuperConstructorSelector(initializers.head);
final ClassElement classElement = constructor.enclosingClass;
- return classElement.lookupConstructor(selector);
+ return classElement.lookupConstructor(selector.name);
}
return null;
}
@@ -4829,8 +4829,7 @@ class ConstructorResolver extends CommonResolverVisitor<Element> {
Node diagnosticNode,
String constructorName) {
cls.ensureResolved(compiler);
- Selector selector = createConstructorSelector(constructorName);
- Element result = cls.lookupConstructor(selector);
+ Element result = cls.lookupConstructor(constructorName);
if (result == null) {
String fullConstructorName = Elements.constructorNameForDiagnostics(
cls.name,
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698