| Index: lib/compiler/implementation/elements/elements.dart
|
| diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
|
| index 6ecc0848ff4121fed3d06d52c5e05d18925784c2..a557fc3204e064dbc269b8161c3ca1e450ec0ebd 100644
|
| --- a/lib/compiler/implementation/elements/elements.dart
|
| +++ b/lib/compiler/implementation/elements/elements.dart
|
| @@ -1376,21 +1376,14 @@ class ClassElement extends ScopeContainerElement
|
| }
|
| }
|
|
|
| - Element lookupConstructor(SourceString className,
|
| - [SourceString constructorName =
|
| - const SourceString(''),
|
| - Element noMatch(Element)]) {
|
| + Element lookupConstructor(Selector selector, [Element noMatch(Element)]) {
|
| // TODO(karlklose): have a map from class names to a map of constructors
|
| // instead of creating the name here?
|
| - SourceString normalizedName;
|
| - if (constructorName !== const SourceString('')) {
|
| - normalizedName = Elements.constructConstructorName(className,
|
| - constructorName);
|
| - } else {
|
| - normalizedName = className;
|
| - }
|
| - Element result = localLookup(normalizedName);
|
| - if (result === null || !result.isConstructor()) {
|
| + Element result = localLookup(selector.normalizedConstructorName);
|
| + if (result === null
|
| + || !result.isConstructor()
|
| + || (selector.name.isPrivate()
|
| + && result.getLibrary() != selector.library)) {
|
| result = noMatch !== null ? noMatch(result) : null;
|
| }
|
| return result;
|
|
|