Skip to content

Commit c0267ec

Browse files
committed
Adding test
1 parent ff47fa1 commit c0267ec

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tests/cases/compiler/missingPropertiesOfClassExpression.ts(1,52): error TS2339: Property 'y' does not exist on type '(Anonymous class)'.
2+
3+
4+
==== tests/cases/compiler/missingPropertiesOfClassExpression.ts (1 errors) ====
5+
class George extends class { reset() { return this.y; } } {
6+
~
7+
!!! error TS2339: Property 'y' does not exist on type '(Anonymous class)'.
8+
constructor() {
9+
super();
10+
}
11+
}
12+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//// [missingPropertiesOfClassExpression.ts]
2+
class George extends class { reset() { return this.y; } } {
3+
constructor() {
4+
super();
5+
}
6+
}
7+
8+
9+
//// [missingPropertiesOfClassExpression.js]
10+
var __extends = (this && this.__extends) || function (d, b) {
11+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
12+
function __() { this.constructor = d; }
13+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14+
};
15+
var George = (function (_super) {
16+
__extends(George, _super);
17+
function George() {
18+
_super.call(this);
19+
}
20+
return George;
21+
})((function () {
22+
function class_1() {
23+
}
24+
class_1.prototype.reset = function () { return this.y; };
25+
return class_1;
26+
})());
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class George extends class { reset() { return this.y; } } {
2+
constructor() {
3+
super();
4+
}
5+
}

0 commit comments

Comments
 (0)