Adding test

This commit is contained in:
Anders Hejlsberg
2015-08-27 14:22:42 -07:00
parent ff47fa124a
commit c0267ec8e1
3 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
tests/cases/compiler/missingPropertiesOfClassExpression.ts(1,52): error TS2339: Property 'y' does not exist on type '(Anonymous class)'.
==== tests/cases/compiler/missingPropertiesOfClassExpression.ts (1 errors) ====
class George extends class { reset() { return this.y; } } {
~
!!! error TS2339: Property 'y' does not exist on type '(Anonymous class)'.
constructor() {
super();
}
}

View File

@@ -0,0 +1,26 @@
//// [missingPropertiesOfClassExpression.ts]
class George extends class { reset() { return this.y; } } {
constructor() {
super();
}
}
//// [missingPropertiesOfClassExpression.js]
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var George = (function (_super) {
__extends(George, _super);
function George() {
_super.call(this);
}
return George;
})((function () {
function class_1() {
}
class_1.prototype.reset = function () { return this.y; };
return class_1;
})());

View File

@@ -0,0 +1,5 @@
class George extends class { reset() { return this.y; } } {
constructor() {
super();
}
}