Update baselines

This commit is contained in:
Yui T
2015-03-15 16:29:41 -07:00
parent 2a07d3f8db
commit 9bf5a11bef
48 changed files with 454 additions and 970 deletions

View File

@@ -55,12 +55,6 @@ var c = new C(1, 2, ...a);
//// [callWithSpreadES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
function foo(x, y, ...z) {
}
var a;
@@ -84,26 +78,23 @@ xa[1].foo(...[
2,
"abc"
]);
var C = (function () {
function C(x, y, ...z) {
class C {
constructor(x, y, ...z) {
this.foo(x, y);
this.foo(x, y, ...z);
}
C.prototype.foo = function (x, y, ...z) {
};
return C;
})();
var D = (function (_super) {
__extends(D, _super);
function D() {
_super.call(this, 1, 2);
_super.call(this, 1, 2, ...a);
foo(x, y, ...z) {
}
D.prototype.foo = function () {
_super.prototype.foo.call(this, 1, 2);
_super.prototype.foo.call(this, 1, 2, ...a);
};
return D;
})(C);
}
class D extends C {
constructor() {
super(1, 2);
super(1, 2, ...a);
}
foo() {
super.foo(1, 2);
super.foo(1, 2, ...a);
}
}
// Only supported in when target is ES6
var c = new C(1, 2, ...a);

View File

@@ -20,12 +20,11 @@ class C {
var s;
var n;
var a;
var C = (function () {
function C() {
class C {
constructor() {
this[n] = n;
this[s + n] = 2;
this[`hello bye`] = 0;
}
C[`hello ${a} bye`] = 0;
return C;
})();
}
C[`hello ${a} bye`] = 0;

View File

@@ -20,30 +20,27 @@ class C {
var s;
var n;
var a;
var C = (function () {
function C() {
class C {
[s]() {
}
C.prototype[s] = function () {
};
C.prototype[n] = function () {
};
C[s + s] = function () {
};
C.prototype[s + n] = function () {
};
C.prototype[+s] = function () {
};
C[""] = function () {
};
C.prototype[0] = function () {
};
C.prototype[a] = function () {
};
C[true] = function () {
};
C.prototype[`hello bye`] = function () {
};
C[`hello ${a} bye`] = function () {
};
return C;
})();
[n]() {
}
static [s + s]() {
}
[s + n]() {
}
[+s]() {
}
static [""]() {
}
[0]() {
}
[a]() {
}
static [true]() {
}
[`hello bye`]() {
}
static [`hello ${a} bye`]() {
}
}

View File

@@ -11,20 +11,17 @@ class C {
//// [computedPropertyNames14_ES6.js]
var b;
var C = (function () {
function C() {
class C {
[b]() {
}
C.prototype[b] = function () {
};
C[true] = function () {
};
C.prototype[[]] = function () {
};
C[{}] = function () {
};
C.prototype[undefined] = function () {
};
C[null] = function () {
};
return C;
})();
static [true]() {
}
[[]]() {
}
static [{}]() {
}
[undefined]() {
}
static [null]() {
}
}

View File

@@ -12,14 +12,11 @@ class C {
var p1;
var p2;
var p3;
var C = (function () {
function C() {
class C {
[p1]() {
}
C.prototype[p1] = function () {
};
C.prototype[p2] = function () {
};
C.prototype[p3] = function () {
};
return C;
})();
[p2]() {
}
[p3]() {
}
}

View File

@@ -20,80 +20,33 @@ class C {
var s;
var n;
var a;
var C = (function () {
function C() {
class C {
get [s]() {
return 0;
}
Object.defineProperty(C.prototype, s, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, n, {
set: function (v) {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, s + s, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, s + n, {
set: function (v) {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, +s, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, "", {
set: function (v) {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, 0, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, a, {
set: function (v) {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, true, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, `hello bye`, {
set: function (v) {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, `hello ${a} bye`, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
return C;
})();
set [n](v) {
}
static get [s + s]() {
return 0;
}
set [s + n](v) {
}
get [+s]() {
return 0;
}
static set [""](v) {
}
get [0]() {
return 0;
}
set [a](v) {
}
static get [true]() {
return 0;
}
set [`hello bye`](v) {
}
get [`hello ${a} bye`]() {
return 0;
}
}

View File

@@ -11,47 +11,20 @@ class C {
//// [computedPropertyNames17_ES6.js]
var b;
var C = (function () {
function C() {
class C {
get [b]() {
return 0;
}
Object.defineProperty(C.prototype, b, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, true, {
set: function (v) {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, [], {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, {}, {
set: function (v) {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, undefined, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, null, {
set: function (v) {
},
enumerable: true,
configurable: true
});
return C;
})();
static set [true](v) {
}
get [[]]() {
return 0;
}
set [{}](v) {
}
static get [undefined]() {
return 0;
}
set [null](v) {
}
}

View File

@@ -7,13 +7,10 @@ class C {
}
//// [computedPropertyNames21_ES6.js]
var C = (function () {
function C() {
}
C.prototype.bar = function () {
class C {
bar() {
return 0;
};
C.prototype[this.bar()] = function () {
};
return C;
})();
}
[this.bar()]() {
}
}

View File

@@ -9,15 +9,12 @@ class C {
}
//// [computedPropertyNames22_ES6.js]
var C = (function () {
function C() {
}
C.prototype.bar = function () {
class C {
bar() {
var obj = {
[this.bar()]() {
}
};
return 0;
};
return C;
})();
}
}

View File

@@ -9,15 +9,12 @@ class C {
}
//// [computedPropertyNames23_ES6.js]
var C = (function () {
function C() {
}
C.prototype.bar = function () {
class C {
bar() {
return 0;
};
C.prototype[{
}
[{
[this.bar()]: 1
}[0]] = function () {
};
return C;
})();
}[0]]() {
}
}

View File

@@ -11,28 +11,14 @@ class C extends Base {
}
//// [computedPropertyNames24_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Base = (function () {
function Base() {
}
Base.prototype.bar = function () {
class Base {
bar() {
return 0;
};
return Base;
})();
var C = (function (_super) {
__extends(C, _super);
function C() {
_super.apply(this, arguments);
}
}
class C extends Base {
// Gets emitted as super, not _super, which is consistent with
// use of super in static properties initializers.
C.prototype[super.bar.call(this)] = function () {
};
return C;
})(Base);
[super.bar()]() {
}
}

View File

@@ -14,31 +14,17 @@ class C extends Base {
}
//// [computedPropertyNames25_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Base = (function () {
function Base() {
}
Base.prototype.bar = function () {
class Base {
bar() {
return 0;
};
return Base;
})();
var C = (function (_super) {
__extends(C, _super);
function C() {
_super.apply(this, arguments);
}
C.prototype.foo = function () {
}
class C extends Base {
foo() {
var obj = {
[_super.prototype.bar.call(this)]() {
[super.bar()]() {
}
};
return 0;
};
return C;
})(Base);
}
}

View File

@@ -13,30 +13,16 @@ class C extends Base {
}
//// [computedPropertyNames26_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Base = (function () {
function Base() {
}
Base.prototype.bar = function () {
class Base {
bar() {
return 0;
};
return Base;
})();
var C = (function (_super) {
__extends(C, _super);
function C() {
_super.apply(this, arguments);
}
}
class C extends Base {
// Gets emitted as super, not _super, which is consistent with
// use of super in static properties initializers.
C.prototype[{
[super.bar.call(this)]: 1
}[0]] = function () {
};
return C;
})(Base);
[{
[super.bar()]: 1
}[0]]() {
}
}

View File

@@ -6,23 +6,9 @@ class C extends Base {
}
//// [computedPropertyNames27_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Base = (function () {
function Base() {
class Base {
}
class C extends Base {
[(super(), "prop")]() {
}
return Base;
})();
var C = (function (_super) {
__extends(C, _super);
function C() {
_super.apply(this, arguments);
}
C.prototype[(_super.call(this), "prop")] = function () {
};
return C;
})(Base);
}

View File

@@ -11,25 +11,14 @@ class C extends Base {
}
//// [computedPropertyNames28_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Base = (function () {
function Base() {
}
return Base;
})();
var C = (function (_super) {
__extends(C, _super);
function C() {
_super.call(this);
class Base {
}
class C extends Base {
constructor() {
super();
var obj = {
[(_super.call(this), "prop")]() {
[(super(), "prop")]() {
}
};
}
return C;
})(Base);
}

View File

@@ -11,10 +11,8 @@ class C {
}
//// [computedPropertyNames29_ES6.js]
var C = (function () {
function C() {
}
C.prototype.bar = function () {
class C {
bar() {
(() => {
var obj = {
[this.bar()]() {
@@ -22,6 +20,5 @@ var C = (function () {
};
});
return 0;
};
return C;
})();
}
}

View File

@@ -13,36 +13,17 @@ class C {
//// [computedPropertyNames2_ES6.js]
var methodName = "method";
var accessorName = "accessor";
var C = (function () {
function C() {
class C {
[methodName]() {
}
C.prototype[methodName] = function () {
};
C[methodName] = function () {
};
Object.defineProperty(C.prototype, accessorName, {
get: function () {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, accessorName, {
set: function (v) {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, accessorName, {
get: function () {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, accessorName, {
set: function (v) {
},
enumerable: true,
configurable: true
});
return C;
})();
static [methodName]() {
}
get [accessorName]() {
}
set [accessorName](v) {
}
static get [accessorName]() {
}
static set [accessorName](v) {
}
}

View File

@@ -16,30 +16,19 @@ class C extends Base {
}
//// [computedPropertyNames30_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Base = (function () {
function Base() {
}
return Base;
})();
var C = (function (_super) {
__extends(C, _super);
function C() {
_super.call(this);
class Base {
}
class C extends Base {
constructor() {
super();
(() => {
var obj = {
// Ideally, we would capture this. But the reference is
// illegal, and not capturing this is consistent with
//treatment of other similar violations.
[(_super.call(this), "prop")]() {
[(super(), "prop")]() {
}
};
});
}
return C;
})(Base);
}

View File

@@ -16,34 +16,20 @@ class C extends Base {
}
//// [computedPropertyNames31_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Base = (function () {
function Base() {
}
Base.prototype.bar = function () {
class Base {
bar() {
return 0;
};
return Base;
})();
var C = (function (_super) {
__extends(C, _super);
function C() {
_super.apply(this, arguments);
}
C.prototype.foo = function () {
}
class C extends Base {
foo() {
var _this = this;
(() => {
var obj = {
[_super.prototype.bar.call(_this)]() {
[super.bar()]() {
} // needs capture
};
});
return 0;
};
return C;
})(Base);
}
}

View File

@@ -11,13 +11,10 @@ class C<T> {
function foo() {
return '';
}
var C = (function () {
function C() {
}
C.prototype.bar = function () {
class C {
bar() {
return 0;
};
C.prototype[foo()] = function () {
};
return C;
})();
}
[foo()]() {
}
}

View File

@@ -13,15 +13,12 @@ class C<T> {
function foo() {
return '';
}
var C = (function () {
function C() {
}
C.prototype.bar = function () {
class C {
bar() {
var obj = {
[foo()]() {
}
};
return 0;
};
return C;
})();
}
}

View File

@@ -13,15 +13,12 @@ class C<T> {
function foo() {
return '';
}
var C = (function () {
function C() {
}
C.bar = function () {
class C {
static bar() {
var obj = {
[foo()]() {
}
};
return 0;
};
return C;
})();
}
}

View File

@@ -11,32 +11,15 @@ class C {
}
//// [computedPropertyNames36_ES6.js]
var Foo = (function () {
function Foo() {
class Foo {
}
class Foo2 {
}
class C {
// Computed properties
get ["get1"]() {
return new Foo;
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
set ["set1"](p) {
}
return Foo2;
})();
var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, "get1", {
// Computed properties
get: function () {
return new Foo;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, "set1", {
set: function (p) {
},
enumerable: true,
configurable: true
});
return C;
})();
}

View File

@@ -11,32 +11,15 @@ class C {
}
//// [computedPropertyNames37_ES6.js]
var Foo = (function () {
function Foo() {
class Foo {
}
class Foo2 {
}
class C {
// Computed properties
get ["get1"]() {
return new Foo;
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
set ["set1"](p) {
}
return Foo2;
})();
var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, "get1", {
// Computed properties
get: function () {
return new Foo;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, "set1", {
set: function (p) {
},
enumerable: true,
configurable: true
});
return C;
})();
}

View File

@@ -11,32 +11,15 @@ class C {
}
//// [computedPropertyNames38_ES6.js]
var Foo = (function () {
function Foo() {
class Foo {
}
class Foo2 {
}
class C {
// Computed properties
get [1 << 6]() {
return new Foo;
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
set [1 << 6](p) {
}
return Foo2;
})();
var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, 1 << 6, {
// Computed properties
get: function () {
return new Foo;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, 1 << 6, {
set: function (p) {
},
enumerable: true,
configurable: true
});
return C;
})();
}

View File

@@ -11,32 +11,15 @@ class C {
}
//// [computedPropertyNames39_ES6.js]
var Foo = (function () {
function Foo() {
class Foo {
}
class Foo2 {
}
class C {
// Computed properties
get [1 << 6]() {
return new Foo;
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
set [1 << 6](p) {
}
return Foo2;
})();
var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, 1 << 6, {
// Computed properties
get: function () {
return new Foo;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, 1 << 6, {
set: function (p) {
},
enumerable: true,
configurable: true
});
return C;
})();
}

View File

@@ -1,12 +1,13 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts (6 errors) ====
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts (7 errors) ====
var id;
class C {
[0 + 1]() { }
@@ -18,6 +19,8 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,1
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
~~~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
~~
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
set [[0, 1]](v) { }
~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.

View File

@@ -11,40 +11,21 @@ class C {
//// [computedPropertyNames3_ES6.js]
var id;
var C = (function () {
function C() {
class C {
[0 + 1]() {
}
C.prototype[0 + 1] = function () {
};
C[() => {
}] = function () {
};
Object.defineProperty(C.prototype, delete id, {
get: function () {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, [
static [() => {
}]() {
}
get [delete id]() {
}
set [[
0,
1
], {
set: function (v) {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, "", {
get: function () {
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, id.toString(), {
set: function (v) {
},
enumerable: true,
configurable: true
});
return C;
})();
]](v) {
}
static get [""]() {
}
static set [id.toString()](v) {
}
}

View File

@@ -11,25 +11,16 @@ class C {
}
//// [computedPropertyNames40_ES6.js]
var Foo = (function () {
function Foo() {
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
}
return Foo2;
})();
var C = (function () {
function C() {
}
class Foo {
}
class Foo2 {
}
class C {
// Computed properties
C.prototype[""] = function () {
[""]() {
return new Foo;
};
C.prototype[""] = function () {
}
[""]() {
return new Foo2;
};
return C;
})();
}
}

View File

@@ -10,22 +10,13 @@ class C {
}
//// [computedPropertyNames41_ES6.js]
var Foo = (function () {
function Foo() {
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
}
return Foo2;
})();
var C = (function () {
function C() {
}
class Foo {
}
class Foo2 {
}
class C {
// Computed properties
C[""] = function () {
static [""]() {
return new Foo;
};
return C;
})();
}
}

View File

@@ -10,18 +10,9 @@ class C {
}
//// [computedPropertyNames42_ES6.js]
var Foo = (function () {
function Foo() {
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
}
return Foo2;
})();
var C = (function () {
function C() {
}
return C;
})();
class Foo {
}
class Foo2 {
}
class C {
}

View File

@@ -13,45 +13,17 @@ class D extends C {
}
//// [computedPropertyNames43_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Foo = (function () {
function Foo() {
class Foo {
}
class Foo2 {
}
class C {
}
class D extends C {
// Computed properties
get ["get1"]() {
return new Foo;
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
set ["set1"](p) {
}
return Foo2;
})();
var C = (function () {
function C() {
}
return C;
})();
var D = (function (_super) {
__extends(D, _super);
function D() {
_super.apply(this, arguments);
}
Object.defineProperty(D.prototype, "get1", {
// Computed properties
get: function () {
return new Foo;
},
enumerable: true,
configurable: true
});
Object.defineProperty(D.prototype, "set1", {
set: function (p) {
},
enumerable: true,
configurable: true
});
return D;
})(C);
}

View File

@@ -12,44 +12,16 @@ class D extends C {
}
//// [computedPropertyNames44_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Foo = (function () {
function Foo() {
class Foo {
}
class Foo2 {
}
class C {
get ["get1"]() {
return new Foo;
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
}
class D extends C {
set ["set1"](p) {
}
return Foo2;
})();
var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, "get1", {
get: function () {
return new Foo;
},
enumerable: true,
configurable: true
});
return C;
})();
var D = (function (_super) {
__extends(D, _super);
function D() {
_super.apply(this, arguments);
}
Object.defineProperty(D.prototype, "set1", {
set: function (p) {
},
enumerable: true,
configurable: true
});
return D;
})(C);
}

View File

@@ -13,44 +13,16 @@ class D extends C {
}
//// [computedPropertyNames45_ES6.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Foo = (function () {
function Foo() {
class Foo {
}
class Foo2 {
}
class C {
get ["get1"]() {
return new Foo;
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
}
class D extends C {
set ["set1"](p) {
}
return Foo2;
})();
var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, "get1", {
get: function () {
return new Foo;
},
enumerable: true,
configurable: true
});
return C;
})();
var D = (function (_super) {
__extends(D, _super);
function D() {
_super.apply(this, arguments);
}
Object.defineProperty(D.prototype, "set1", {
set: function (p) {
},
enumerable: true,
configurable: true
});
return D;
})(C);
}

View File

@@ -6,26 +6,15 @@ class C {
}
//// [computedPropertyNamesDeclarationEmit1_ES6.js]
var C = (function () {
function C() {
class C {
["" + ""]() {
}
C.prototype["" + ""] = function () {
};
Object.defineProperty(C.prototype, "" + "", {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, "" + "", {
set: function (x) {
},
enumerable: true,
configurable: true
});
return C;
})();
get ["" + ""]() {
return 0;
}
set ["" + ""](x) {
}
}
//// [computedPropertyNamesDeclarationEmit1_ES6.d.ts]

View File

@@ -6,26 +6,15 @@ class C {
}
//// [computedPropertyNamesDeclarationEmit2_ES6.js]
var C = (function () {
function C() {
class C {
static ["" + ""]() {
}
C["" + ""] = function () {
};
Object.defineProperty(C, "" + "", {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, "" + "", {
set: function (x) {
},
enumerable: true,
configurable: true
});
return C;
})();
static get ["" + ""]() {
return 0;
}
static set ["" + ""](x) {
}
}
//// [computedPropertyNamesDeclarationEmit2_ES6.d.ts]

View File

@@ -10,10 +10,7 @@ class C {
//// [computedPropertyNamesOnOverloads_ES6.js]
var methodName = "method";
var accessorName = "accessor";
var C = (function () {
function C() {
class C {
[methodName](v) {
}
C.prototype[methodName] = function (v) {
};
return C;
})();
}

View File

@@ -1,2 +1,2 @@
//// [computedPropertyNamesSourceMap1_ES5.js.map]
{"version":3,"file":"computedPropertyNamesSourceMap1_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap1_ES5.ts"],"names":["C","C.constructor","C[\"hello\"]"],"mappings":"AAAA;IAAAA;IAIAC,CAACA;IAHGD,YAACA,OAAOA,CAACA,GAATA;QACIE,QAAQA,CAACA;IACbA,CAACA;IACLF,QAACA;AAADA,CAACA,AAJD,IAIC"}
{"version":3,"file":"computedPropertyNamesSourceMap1_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap1_ES5.ts"],"names":["C","C.constructor","C[\"hello\"]"],"mappings":"AAAA;IAAAA;IAIAC,CAACA;IAHGD,YAACA,OAAOA;QACJE,QAAQA,CAACA;IACbA,CAACA;IACLF,QAACA;AAADA,CAACA,AAJD,IAIC"}

View File

@@ -37,24 +37,18 @@ sourceFile:computedPropertyNamesSourceMap1_ES5.ts
1->^^^^
2 > ^^^^^^^^^^^^
3 > ^^^^^^^
4 > ^
5 > ^^^
1->
2 > [
3 > "hello"
4 > ]
5 >
1->Emitted(4, 5) Source(2, 5) + SourceIndex(0) name (C)
2 >Emitted(4, 17) Source(2, 6) + SourceIndex(0) name (C)
3 >Emitted(4, 24) Source(2, 13) + SourceIndex(0) name (C)
4 >Emitted(4, 25) Source(2, 14) + SourceIndex(0) name (C)
5 >Emitted(4, 28) Source(2, 5) + SourceIndex(0) name (C)
---
>>> debugger;
1 >^^^^^^^^
2 > ^^^^^^^^
3 > ^
1 >["hello"]() {
1 >]() {
>
2 > debugger
3 > ;

View File

@@ -6,12 +6,9 @@ class C {
}
//// [computedPropertyNamesSourceMap1_ES6.js]
var C = (function () {
function C() {
}
C.prototype["hello"] = function () {
class C {
["hello"]() {
debugger;
};
return C;
})();
}
}
//# sourceMappingURL=computedPropertyNamesSourceMap1_ES6.js.map

View File

@@ -1,2 +1,2 @@
//// [computedPropertyNamesSourceMap1_ES6.js.map]
{"version":3,"file":"computedPropertyNamesSourceMap1_ES6.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap1_ES6.ts"],"names":["C","C.constructor","C[\"hello\"]"],"mappings":"AAAA;IAAAA;IAIAC,CAACA;IAHGD,YAACA,OAAOA,CAACA,GAATA;QACIE,QAAQA,CAACA;IACbA,CAACA;IACLF,QAACA;AAADA,CAACA,AAJD,IAIC"}
{"version":3,"file":"computedPropertyNamesSourceMap1_ES6.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap1_ES6.ts"],"names":["C","C[\"hello\"]"],"mappings":"AAAA;IACIA,CAACA,OAAOA;QACJC,QAAQA,CAACA;IACbA,CAACA;AACLD,CAACA;AAAA"}

View File

@@ -8,96 +8,58 @@ sources: computedPropertyNamesSourceMap1_ES6.ts
emittedFile:tests/cases/conformance/es6/computedProperties/computedPropertyNamesSourceMap1_ES6.js
sourceFile:computedPropertyNamesSourceMap1_ES6.ts
-------------------------------------------------------------------
>>>var C = (function () {
>>>class C {
1 >
2 >^^^^^^^^^^^^^^^^^^^->
2 >^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C)
---
>>> }
>>> ["hello"]() {
1->^^^^
2 > ^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
3 > ^^^^^^^
4 > ^^^^^^->
1->class C {
> ["hello"]() {
> debugger;
> }
>
2 > }
1->Emitted(3, 5) Source(5, 1) + SourceIndex(0) name (C.constructor)
2 >Emitted(3, 6) Source(5, 2) + SourceIndex(0) name (C.constructor)
---
>>> C.prototype["hello"] = function () {
1->^^^^
2 > ^^^^^^^^^^^^
3 > ^^^^^^^
4 > ^
5 > ^^^
1->
>
2 > [
3 > "hello"
4 > ]
5 >
1->Emitted(4, 5) Source(2, 5) + SourceIndex(0) name (C)
2 >Emitted(4, 17) Source(2, 6) + SourceIndex(0) name (C)
3 >Emitted(4, 24) Source(2, 13) + SourceIndex(0) name (C)
4 >Emitted(4, 25) Source(2, 14) + SourceIndex(0) name (C)
5 >Emitted(4, 28) Source(2, 5) + SourceIndex(0) name (C)
3 > "hello"
1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (C)
2 >Emitted(2, 6) Source(2, 6) + SourceIndex(0) name (C)
3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) name (C)
---
>>> debugger;
1 >^^^^^^^^
1->^^^^^^^^
2 > ^^^^^^^^
3 > ^
1 >["hello"]() {
1->]() {
>
2 > debugger
3 > ;
1 >Emitted(5, 9) Source(3, 9) + SourceIndex(0) name (C["hello"])
2 >Emitted(5, 17) Source(3, 17) + SourceIndex(0) name (C["hello"])
3 >Emitted(5, 18) Source(3, 18) + SourceIndex(0) name (C["hello"])
1->Emitted(3, 9) Source(3, 9) + SourceIndex(0) name (C["hello"])
2 >Emitted(3, 17) Source(3, 17) + SourceIndex(0) name (C["hello"])
3 >Emitted(3, 18) Source(3, 18) + SourceIndex(0) name (C["hello"])
---
>>> };
>>> }
1 >^^^^
2 > ^
3 > ^^^^^^^^^->
1 >
>
2 > }
1 >Emitted(6, 5) Source(4, 5) + SourceIndex(0) name (C["hello"])
2 >Emitted(6, 6) Source(4, 6) + SourceIndex(0) name (C["hello"])
1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) name (C["hello"])
2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) name (C["hello"])
---
>>> return C;
1->^^^^
2 > ^^^^^^^^
1->
>
2 > }
1->Emitted(7, 5) Source(5, 1) + SourceIndex(0) name (C)
2 >Emitted(7, 13) Source(5, 2) + SourceIndex(0) name (C)
---
>>>})();
>>>}
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
2 >}
3 >
4 > class C {
> ["hello"]() {
> debugger;
> }
> }
1 >Emitted(8, 1) Source(5, 1) + SourceIndex(0) name (C)
2 >Emitted(8, 2) Source(5, 2) + SourceIndex(0) name (C)
3 >Emitted(8, 2) Source(1, 1) + SourceIndex(0)
4 >Emitted(8, 6) Source(5, 2) + SourceIndex(0)
1 >Emitted(5, 1) Source(5, 1) + SourceIndex(0) name (C)
2 >Emitted(5, 2) Source(5, 2) + SourceIndex(0) name (C)
---
>>>//# sourceMappingURL=computedPropertyNamesSourceMap1_ES6.js.map
>>>//# sourceMappingURL=computedPropertyNamesSourceMap1_ES6.js.map1->
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1->
1->Emitted(6, 1) Source(5, 2) + SourceIndex(0)
---

View File

@@ -242,30 +242,25 @@ var m;
}
})(m || (m = {}));
// methods
var C = (function () {
function C() {
class C {
constructor() {
const c = 0;
n = c;
}
C.prototype.method = function () {
method() {
const c = 0;
n = c;
};
Object.defineProperty(C.prototype, "v", {
get: function () {
const c = 0;
n = c;
return n;
},
set: function (value) {
const c = 0;
n = c;
},
enumerable: true,
configurable: true
});
return C;
})();
}
get v() {
const c = 0;
n = c;
return n;
}
set v(value) {
const c = 0;
n = c;
}
}
// object literals
var o = {
f() {

View File

@@ -201,26 +201,21 @@ var m;
}
})(m || (m = {}));
// methods
var C = (function () {
function C() {
class C {
constructor() {
const c24 = 0;
}
C.prototype.method = function () {
method() {
const c25 = 0;
};
Object.defineProperty(C.prototype, "v", {
get: function () {
const c26 = 0;
return c26;
},
set: function (value) {
const c27 = value;
},
enumerable: true,
configurable: true
});
return C;
})();
}
get v() {
const c26 = 0;
return c26;
}
set v(value) {
const c27 = value;
}
}
// object literals
var o = {
f() {

View File

@@ -28,38 +28,26 @@ class C2 extends C1<number, string, boolean> {
//// [destructuringParameterProperties4.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var C1 = (function () {
function C1(k, [a, b, c]) {
class C1 {
constructor(k, [a, b, c]) {
this.k = k;
this.[a, b, c] = [a, b, c];
if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) {
this.a = a || k;
}
}
C1.prototype.getA = function () {
getA() {
return this.a;
};
C1.prototype.getB = function () {
return this.b;
};
C1.prototype.getC = function () {
return this.c;
};
return C1;
})();
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
_super.apply(this, arguments);
}
C2.prototype.doSomethingWithSuperProperties = function () {
getB() {
return this.b;
}
getC() {
return this.c;
}
}
class C2 extends C1 {
doSomethingWithSuperProperties() {
return `${this.a} ${this.b} ${this.c}`;
};
return C2;
})(C1);
}
}

View File

@@ -17,26 +17,23 @@ class E {
}
//// [emitDefaultParametersMethodES6.js]
var C = (function () {
function C(t, z, x, y = "hello") {
class C {
constructor(t, z, x, y = "hello") {
}
C.prototype.foo = function (x, t = false) {
};
C.prototype.foo1 = function (x, t = false, ...rest) {
};
C.prototype.bar = function (t = false) {
};
C.prototype.boo = function (t = false, ...rest) {
};
return C;
})();
var D = (function () {
function D(y = "hello") {
foo(x, t = false) {
}
return D;
})();
var E = (function () {
function E(y = "hello", ...rest) {
foo1(x, t = false, ...rest) {
}
return E;
})();
bar(t = false) {
}
boo(t = false, ...rest) {
}
}
class D {
constructor(y = "hello") {
}
}
class E {
constructor(y = "hello", ...rest) {
}
}

View File

@@ -15,21 +15,19 @@ class D {
//// [emitRestParametersMethodES6.js]
var C = (function () {
function C(name, ...rest) {
class C {
constructor(name, ...rest) {
}
C.prototype.bar = function (...rest) {
};
C.prototype.foo = function (x, ...rest) {
};
return C;
})();
var D = (function () {
function D(...rest) {
bar(...rest) {
}
D.prototype.bar = function (...rest) {
};
D.prototype.foo = function (x, ...rest) {
};
return D;
})();
foo(x, ...rest) {
}
}
class D {
constructor(...rest) {
}
bar(...rest) {
}
foo(x, ...rest) {
}
}