| Index: lib/src/codegen/js_codegen.dart
|
| diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
|
| index bf9fe50236b0deb9c07b51682fb83c7af62c383d..5e6df418f75c8463a730ee9826930511f8cda962 100644
|
| --- a/lib/src/codegen/js_codegen.dart
|
| +++ b/lib/src/codegen/js_codegen.dart
|
| @@ -603,12 +603,22 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| _emitFunctionTypeParts(element.type, dynamicIsBottom: false);
|
| var property =
|
| new JS.Property(memberName, new JS.ArrayInitializer(parts));
|
| - if (node.isStatic) {
|
| + if (node.isStatic) {
|
| tStatics.add(property);
|
| sNames.add(memberName);
|
| } else tMethods.add(property);
|
| }
|
| }
|
| + var tCtors = [];
|
| + for (ConstructorDeclaration node in ctors) {
|
| + var memberName = _constructorName(classElem.name, node.name);
|
| + var element = node.element;
|
| + var parts =
|
| + _emitFunctionTypeParts(element.type, dynamicIsBottom: false);
|
| + var property =
|
| + new JS.Property(memberName, new JS.ArrayInitializer(parts));
|
| + tCtors.add(property);
|
| + }
|
| build(name, elements) {
|
| var o =
|
| new JS.ObjectInitializer(elements, vertical: elements.length > 1);
|
| @@ -617,6 +627,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| return p;
|
| }
|
| var sigFields = [];
|
| + if (!tCtors.isEmpty) sigFields.add(build('constructors', tCtors));
|
| if (!tMethods.isEmpty) sigFields.add(build('methods', tMethods));
|
| if (!tStatics.isEmpty) {
|
| assert(!sNames.isEmpty);
|
| @@ -625,7 +636,6 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| sigFields.add(build('statics', tStatics));
|
| sigFields.add(aNames);
|
| }
|
| -
|
| if (!sigFields.isEmpty) {
|
| var sig = new JS.ObjectInitializer(sigFields);
|
| var classExpr = new JS.Identifier(name);
|
|
|