Index: pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart |
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart |
index cdfe24bd071d97d84e16c80928dad28c1d5a440b..2e99d2ad64efb955d0391787291305a34f87be4d 100644 |
--- a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart |
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart |
@@ -442,9 +442,8 @@ class JsClassMirror extends JsMirror implements ClassMirror { |
// TODO(vsm): Support factory constructors and named arguments. |
var name = getName(constructorName); |
assert(namedArgs == null || namedArgs.isEmpty); |
- var instance = (name == 'new' || name == '') |
- ? JS('', 'new #(...#)', _unwrap(_cls), args) |
- : JS('', 'new (#.#)(...#)', _unwrap(_cls), name, args); |
+ if (name == '') name = 'new'; |
+ var instance = JS('', 'new (#.#)(...#)', _unwrap(_cls), name, args); |
return reflect(instance); |
} |