added new strict mode test
This commit is contained in:
parent
4068404cd4
commit
52ab9f110e
46
tests/baselines/reference/strictMode5.js
Normal file
46
tests/baselines/reference/strictMode5.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
//// [strictMode5.ts]
|
||||
function foo(...args) {
|
||||
"use strict"
|
||||
}
|
||||
|
||||
class A {
|
||||
m() {
|
||||
"use strict"
|
||||
|
||||
var v = () => {
|
||||
return this.n();
|
||||
};
|
||||
}
|
||||
n() {}
|
||||
}
|
||||
|
||||
function bar(x: number = 10) {
|
||||
"use strict"
|
||||
}
|
||||
|
||||
//// [strictMode5.js]
|
||||
function foo() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i - 0] = arguments[_i];
|
||||
}
|
||||
"use strict";
|
||||
}
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
A.prototype.m = function () {
|
||||
var _this = this;
|
||||
"use strict";
|
||||
var v = function () {
|
||||
return _this.n();
|
||||
};
|
||||
};
|
||||
A.prototype.n = function () {
|
||||
};
|
||||
return A;
|
||||
})();
|
||||
function bar(x) {
|
||||
if (x === void 0) { x = 10; }
|
||||
"use strict";
|
||||
}
|
18
tests/cases/compiler/strictMode5.ts
Normal file
18
tests/cases/compiler/strictMode5.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
function foo(...args) {
|
||||
"use strict"
|
||||
}
|
||||
|
||||
class A {
|
||||
m() {
|
||||
"use strict"
|
||||
|
||||
var v = () => {
|
||||
return this.n();
|
||||
};
|
||||
}
|
||||
n() {}
|
||||
}
|
||||
|
||||
function bar(x: number = 10) {
|
||||
"use strict"
|
||||
}
|
Loading…
Reference in a new issue