Skip to content

Commit be26d41

Browse files
Add additional tests.
1 parent 7562a34 commit be26d41

9 files changed

+55
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
tests/cases/compiler/classExpressionWithStaticProperties1.ts(1,15): error TS9003: 'class' expressions are not currently supported.
2+
3+
4+
==== tests/cases/compiler/classExpressionWithStaticProperties1.ts (1 errors) ====
5+
var v = class C { static a = 1; static b = 2 };
6+
~
7+
!!! error TS9003: 'class' expressions are not currently supported.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [classExpressionWithStaticProperties1.ts]
2+
var v = class C { static a = 1; static b = 2 };
3+
4+
//// [classExpressionWithStaticProperties1.js]
5+
var v = (function () {
6+
function C() {
7+
}
8+
C.a = 1;
9+
C.b = 2;
10+
return C;
11+
})();
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
tests/cases/compiler/classExpressionWithStaticProperties2.ts(1,15): error TS9003: 'class' expressions are not currently supported.
2+
3+
4+
==== tests/cases/compiler/classExpressionWithStaticProperties2.ts (1 errors) ====
5+
var v = class C { static a = 1; static b };
6+
~
7+
!!! error TS9003: 'class' expressions are not currently supported.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//// [classExpressionWithStaticProperties2.ts]
2+
var v = class C { static a = 1; static b };
3+
4+
//// [classExpressionWithStaticProperties2.js]
5+
var v = (function () {
6+
function C() {
7+
}
8+
C.a = 1;
9+
return C;
10+
})();
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
tests/cases/compiler/classExpressionWithStaticPropertiesES62.ts(1,15): error TS9003: 'class' expressions are not currently supported.
2+
3+
4+
==== tests/cases/compiler/classExpressionWithStaticPropertiesES62.ts (1 errors) ====
5+
var v = class C { static a = 1; static b };
6+
~
7+
!!! error TS9003: 'class' expressions are not currently supported.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//// [classExpressionWithStaticPropertiesES62.ts]
2+
var v = class C { static a = 1; static b };
3+
4+
//// [classExpressionWithStaticPropertiesES62.js]
5+
var v = (_a = class C {
6+
},
7+
_a.a = 1,
8+
_a);
9+
var _a;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var v = class C { static a = 1; static b = 2 };
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var v = class C { static a = 1; static b };
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//@target: es6
2+
var v = class C { static a = 1; static b };

0 commit comments

Comments
 (0)