Skip to content

Commit b2c0a74

Browse files
committed
1 parent a750446 commit b2c0a74

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pkg/dev_compiler/lib/runtime/dart_sdk.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29299,8 +29299,8 @@ dart_library.library('dart_sdk', null, /* Imports */[
2929929299
const _checkInsertIndex = Symbol('_checkInsertIndex');
2930029300
js.JsArray$ = dart.generic(E => {
2930129301
class JsArray extends dart.mixin(js.JsObject, collection.ListMixin$(E)) {
29302-
JsArray() {
29303-
super._fromJs([]);
29302+
static new() {
29303+
return new (js.JsArray$(E))._fromJs([]);
2930429304
}
2930529305
from(other) {
2930629306
super._fromJs((() => {
@@ -29401,7 +29401,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
2940129401
dart.defineNamedConstructor(JsArray, '_fromJs');
2940229402
dart.setSignature(JsArray, {
2940329403
constructors: () => ({
29404-
JsArray: [js.JsArray$(E), []],
29404+
new: [js.JsArray$(E), []],
2940529405
from: [js.JsArray$(E), [core.Iterable$(E)]],
2940629406
_fromJs: [js.JsArray$(E), [dart.dynamic]]
2940729407
}),

pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ class JsArray<E> extends JsObject with ListMixin<E> {
317317
/**
318318
* Creates a new JavaScript array.
319319
*/
320-
JsArray() : super._fromJs([]);
320+
// TODO(vsm): Making this a factory to workaround #537.
321+
factory JsArray() { return new JsArray._fromJs([]); }
321322

322323
/**
323324
* Creates a new JavaScript array and initializes it to the contents of

0 commit comments

Comments
 (0)