| Index: lib/compiler/implementation/resolver.dart
|
| diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
|
| index 06f4b3fcc148b0531c57660a4d57940a20fb1ad7..7c655482aed2518943bf5b071d79c800f6c43a18 100644
|
| --- a/lib/compiler/implementation/resolver.dart
|
| +++ b/lib/compiler/implementation/resolver.dart
|
| @@ -89,7 +89,9 @@ class ResolverTask extends CompilerTask {
|
| final SourceString constructorName =
|
| getConstructorName(initializers.head);
|
| final SourceString className = classElement.name;
|
| - return classElement.lookupConstructor(className, constructorName);
|
| + return classElement.lookupConstructor(constructor.getLibrary(),
|
| + className,
|
| + constructorName);
|
| }
|
| return null;
|
| }
|
| @@ -185,7 +187,9 @@ class ResolverTask extends CompilerTask {
|
| } else {
|
| name = constructor.name;
|
| }
|
| - constructor.defaultImplementation = defaultClass.lookupConstructor(name);
|
| + constructor.defaultImplementation =
|
| + defaultClass.lookupConstructor(defaultClass.getLibrary(),
|
| + name);
|
|
|
| if (constructor.defaultImplementation === null) {
|
| // We failed to find a constructor named either
|
| @@ -592,7 +596,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(constructor.getLibrary(),
|
| + className,
|
| + constructorName);
|
| if (result === null || !result.isGenerativeConstructor()) {
|
| String classNameString = className.slowToString();
|
| String constructorNameString = constructorName.slowToString();
|
| @@ -2596,7 +2603,10 @@ class ConstructorResolver extends CommonResolverVisitor<Element> {
|
| Node diagnosticNode,
|
| SourceString constructorName) {
|
| cls.ensureResolved(compiler);
|
| - Element result = cls.lookupConstructor(cls.name, constructorName);
|
| + Element result =
|
| + cls.lookupConstructor(resolver.enclosingElement.getLibrary(),
|
| + cls.name,
|
| + constructorName);
|
| if (result === null) {
|
| String fullConstructorName = cls.name.slowToString();
|
| if (constructorName !== const SourceString('')) {
|
|
|