| Index: pkg/compiler/lib/src/elements/modelx.dart
|
| diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
|
| index 007e58482e9c7fbdbee9805c16f1c56679984a8b..27fdf7d8bfe42437483f470ecf4b59e155aabcf8 100644
|
| --- a/pkg/compiler/lib/src/elements/modelx.dart
|
| +++ b/pkg/compiler/lib/src/elements/modelx.dart
|
| @@ -2193,12 +2193,18 @@ abstract class BaseClassElementX extends ElementX
|
| return result;
|
| }
|
|
|
| - // TODO(aprelev@gmail.com): Peter believes that it would be great to
|
| - // make noMatch a required argument. Peter's suspicion is that most
|
| - // callers of this method would benefit from using the noMatch method.
|
| - Element lookupConstructor(Selector selector, [Element noMatch(Element)]) {
|
| - Element result = localLookup(selector.name);
|
| - return validateConstructorLookupResults(selector, result, noMatch);
|
| + ConstructorElement lookupDefaultConstructor() {
|
| + ConstructorElement constructor = lookupConstructor("");
|
| + if (constructor != null
|
| + && constructor.functionSignature.requiredParameterCount == 0) {
|
| + return constructor;
|
| + }
|
| + return null;
|
| + }
|
| +
|
| + ConstructorElement lookupConstructor(String name) {
|
| + Element result = localLookup(name);
|
| + return result != null && result.isConstructor ? result : null;
|
| }
|
|
|
| Link<Element> get constructors {
|
|
|