| Index: lib/compiler/implementation/resolver.dart
|
| diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
|
| index 4d48866514c95619f2f715eece5cae4ee62aa3b9..ff83d263582b2d6faa9f288c9081ccba73566ffa 100644
|
| --- a/lib/compiler/implementation/resolver.dart
|
| +++ b/lib/compiler/implementation/resolver.dart
|
| @@ -89,7 +89,12 @@ class ResolverTask extends CompilerTask {
|
| final SourceString constructorName =
|
| getConstructorName(initializers.head);
|
| final SourceString className = classElement.name;
|
| - return classElement.lookupConstructor(className, constructorName);
|
| +
|
| + return classElement.lookupConstructor(
|
| + new Selector.callConstructor(
|
| + new SelectorName.namedConstructor(className, constructorName),
|
| + constructor.getLibrary())
|
| + );
|
| }
|
| return null;
|
| }
|
| @@ -185,7 +190,10 @@ class ResolverTask extends CompilerTask {
|
| } else {
|
| name = constructor.name;
|
| }
|
| - constructor.defaultImplementation = defaultClass.lookupConstructor(name);
|
| + constructor.defaultImplementation = defaultClass.lookupConstructor(
|
| + new Selector.callConstructor(
|
| + new SelectorName.namedClass(name),
|
| + defaultClass.getLibrary()));
|
|
|
| if (constructor.defaultImplementation === null) {
|
| // We failed to find a constructor named either
|
| @@ -592,7 +600,10 @@ class InitializerResolver {
|
| // Lookup constructor and try to match it to the selector.
|
| ResolverTask resolver = visitor.compiler.resolver;
|
| final SourceString className = lookupTarget.name;
|
| - result = lookupTarget.lookupConstructor(className, constructorName);
|
| + result = lookupTarget.lookupConstructor(
|
| + new Selector.callConstructor(
|
| + new SelectorName.namedConstructor(className, constructorName),
|
| + constructor.getLibrary()));
|
| if (result === null || !result.isGenerativeConstructor()) {
|
| String classNameString = className.slowToString();
|
| String constructorNameString = constructorName.slowToString();
|
| @@ -2604,7 +2615,10 @@ class ConstructorResolver extends CommonResolverVisitor<Element> {
|
| Node diagnosticNode,
|
| SourceString constructorName) {
|
| cls.ensureResolved(compiler);
|
| - Element result = cls.lookupConstructor(cls.name, constructorName);
|
| + Element result = cls.lookupConstructor(
|
| + new Selector.callConstructor(
|
| + new SelectorName.namedConstructor(cls.name, constructorName),
|
| + resolver.enclosingElement.getLibrary()));
|
| if (result === null) {
|
| String fullConstructorName = cls.name.slowToString();
|
| if (constructorName !== const SourceString('')) {
|
|
|