| Index: lib/compiler/implementation/resolver.dart
|
| diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
|
| index 246a546edf7ae8b40d13e80b57ae7a63b3775156..e1677d0397ea4a59aabefac17da39b4be49dd7f0 100644
|
| --- a/lib/compiler/implementation/resolver.dart
|
| +++ b/lib/compiler/implementation/resolver.dart
|
| @@ -1875,10 +1875,10 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
|
| * constructors.
|
| */
|
| void addDefaultConstructorIfNeeded(ClassElement element) {
|
| - if (element.constructors.length != 0) return;
|
| + if (element.hasConstructor) return;
|
| SynthesizedConstructorElement constructor =
|
| new SynthesizedConstructorElement(element);
|
| - element.constructors[element.name] = constructor;
|
| + element.addToScope(constructor, compiler);
|
| Type returnType = compiler.types.voidType;
|
| constructor.type = new FunctionType(returnType, const EmptyLink<Type>(),
|
| constructor);
|
|
|